|
Posted by dorayme on 06/28/07 23:56
In article
<1183071632.051220.105200@k79g2000hse.googlegroups.com>,
aaronfude@gmail.com wrote:
> Actually... Suppose I do use a real style sheet. It still means that I
> have to assign a class to every cell in the table, correct? What I'm
> looking for a signle place to set the behavior of internal borders. In
> a way that seems impossible. I can I assign a style to a class - but I
> still have to assign the class to each cell. Please correct me if I'm
> wrong.
No, you don't have to assign a class to each table cell to style
them. You can assign a style to td and all the tds will be so
styled.
td {border: 1px solid #000;}
But let us suppose you have a complex table in which there are
many rows with very many cells in each row. But only some of the
rows are required to be styled a certain way. In this case, it is
effective to class the rows concerned and simply:
tr.results td {border: 1px solid #000;}
All the tds in rows of this class will have this style.
The saving is considerable because there are very many more tds
than trs.
Same goes generally:
div#wrapper div {...}
can target an awful lot of divs in one fell swoop without having
to class each div that requires the desired treatment.
--
dorayme
Navigation:
[Reply to this message]
|