Page 2 of 2
Posted: Sat Aug 26, 2006 4:16 am
by Oren
bokehman wrote:You only need one class. The non-inverted row will then default to the style of a <tr> with no class.
Demo... except thats a <ul> styled like that
This was just for the example, just like when someone ask something about $_POST for eaxmple - I don't teach him at the same time about the security issuses, that would be impossible because then you need to explain X too, Y, Z and so on... It never ends.
bokehman wrote:Also I don't like the idea of the style being embeded in the tag; I want to be able to control everything to do with style from the stylesheet, not by editing a php file.
Again, that's was just an example, you'll never see styles embeded in my tags,
never. I always use an external CSS file.
(I'm talking here ^^^ about a real code of mine, not examples on this forum, although I do my best not to do so even in the examples I give here - I think I've never given an example with embeded style in the tags on the forum too

)
Posted: Sat Aug 26, 2006 4:21 am
by bokehman
onion2k wrote:If you want to be able to control everything from the CSS file, wouldn't it be better to assign two classes (dark and light) rather than using one class and an unstyled table row?

That would depend on the needs of the specific page but if the table were the only table within an IDed ascendant element it would certainly not be necessary. And it is not an unstyled row, it is row that has been styled without using a class.
Posted: Sat Aug 26, 2006 4:23 am
by Oren
onion2k wrote:If you want to be able to control everything from the CSS file, wouldn't it be better to assign two classes (dark and light) rather than using one class and an unstyled table row?

Guys, you are missing the point here - what you are talking about is beyond the scope of this thread.
It really depends on the script. One will want it like this: odd rows will get some color according to their class, even rows will get the default color of table rows... Hence, only one class is needed.
The other guy will want it like this: odd rows get their color according to class_1, even rows get their color according to class_2... Hence, two classes.