2013-10-15 17:31, Tedd Sperling wrote:
On Oct 15, 2013, at 10:06 AM, The Doctor <[email protected]> wrote:
Question 1 in css how d oyou tell the table
to have a visible border?
Google is your friend.
The question is elementary, but a good one, and Google can mislead as
well as point to useful resources.
Type the words --
table css border
-- in a Google search.
The first link is:
http://www.w3schools.com/css/css_table.asp
Sadly enough. See http://w3fools.com
The first example is:
table, th, td
{
border: 1px solid black;
}
Do you think that may help?
It depends.
To tell "the" table to have a visible border, you first need to identify
the table in CSS terms (using selectors). For simplicity, let us assume
that it's the only table on the page, or that you want to apply the same
styling to all tables. Then the simplest way to tell the table to have a
visible border is
table { border-style: solid }
You can also use other values there; the important thing is to set the
value to other than the default, none. It's a common pitfall to set e.g.
border-width: 2px and wonder why there still is no border. And the
reason is that the default border *style* is none.
You can also use the border shortcut, as in border: 1px solid black,
which sets *all* border properties. But setting it on th and td
elements, too, is a different matter.
In CSS, the border around a table and borders around its cells are
different things. As the question was how to "tell the table
to have a visible border", then the correct answer sets border on the
table element alone.
Learning how to find things is part of learning css.
This hopefully includes staying out of w3schools. For example,
https://developer.mozilla.org/en-US/docs/Web/CSS
is way better.
Yucca
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/