T
tshad
Is there a style that equates to rules="all"?
Tom
Tom
tshad said:Is there a style that equates to rules="all"?
rf said:
rf said:Hmmm. Having read your *other* posts on this matter I now understand
what you are talking about.
If you had said "Is there a CSS proterty that equates to the rules=all
attribute/value of the <td> element" it may have been clearer.
This is the bit that talks about borders in CSS "tables".
In any case
there is a good chance that IE will not suport what you want.
tshad said:Is there a style that equates to rules="all"?
rf said:Hmmm. Having read your *other* posts on this matter I now understand what
you are talking about.
If you had said "Is there a CSS proterty that equates to the rules=all
attribute/value of the <td> element" it may have been clearer.
No not really. Have a look at
http://www.w3.org/TR/REC-CSS2/tables.html#borders
This is the bit that talks about borders in CSS "tables". In any case
there
is a good chance that IE will not suport what you want.
What is wrong with using the rules attribute anyway. Doesn't it do what
you
want?
Jukka K. Korpela said:What other posts on this matter?
Well, it would have been odd, since there is no such attribute for <td>.
What rules="all" really means is that it specifies that all _cells_ have
borders. In that sense, it is sufficient to set a border for all th and td
elements. The details depend on what you really want. There is no way in
general to simulate the effect of rules="all" as such, since the borders
you get by using HTML alone are of some unspecified default kind. In CSS,
you can and must be more specific, such as
th, td { border: solid 1px #555; }
tshad said:But this is what is confusing.
If I say borders=1 and no rules, I get
3D borders.
If I say borders=1 and rules=all, I get borders all
around, but they are thin lines.
If I say borders=0 and rules=all, I
get the same thin lines, but not on the outside of the table.
If the rules were to border the cells, why isn't
there a border on the outside of the outside cells?
Not sure what you mean here. What would be considered a non-CSS situation?Jukka K. Korpela said:The <table> attributes mostly _are_ confusing. This is one reason why it
is
often best to play with CSS only when styling a table, except perhaps for
border="1", since it is generally rather important, for a data table, to
have some borders around cells in non-CSS situations.
You mean border, not borders.
By HTML definition, border="1" implies a default of rules="all", i.e.
there
are borders around each cell, in addition to the border around the table
as
a whole. The cell borders have a browser-dependent default appearance,
which you might be able to affect in CSS, but not in (standard) HTML.
Their typical appearance might be characterized as three-dimensional,
though this is somewhat debatable since they are normally 1px thin.
The border around the entire table has the width defined by the border
attribute's value.
I'm pretty sure you have misanalyzed something. Why don't you specify a
demo URL and list the browsers you used for testing this?
On which browser(s)? IE is known to get such things wrong. There should be
no border around the table as a whole if you set border="0", but IE
misbehaves.
Pardon? Are you referring to a _different_ IE misbehavior: if you
additionally set frame="void", IE correctly leaves out the border around
the table as a whole but it also incorrectly leaves out some of the
borders
of the cell?
Did I mention that this is easier in CSS? Just set border="1" in HTML, and
then start playing with CSS.
tshad said:Not sure what you mean here. What would be considered a non-CSS
situation?
I get all kinds of grief when not using CSS, but clearly you still need
to use table attributes for some instances (right?).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.