Forum Moderators: not2easy

Message Too Old, No Replies

Using classes in tables

at the table level .. or the <td> level

         

jayell

6:36 pm on Dec 26, 2004 (gmt 0)

10+ Year Member



If I wish to use a css class to control the font size within a table, I know there was a time when you needed to insert that class into each <td> .. not just at the <table> level. Is that still 'proper' coding .. and if I just insert the class at the <table> level, what browsers (how far back) won't render properly?

(and yes I know I don't have to use 'tables,' but I'm still learning :-)

Jayell

BonRouge

3:31 pm on Dec 27, 2004 (gmt 0)

10+ Year Member



Just in the table tag is fine. You never had to put css in each td - you're thinking of html font tags.

jayell

4:09 pm on Dec 27, 2004 (gmt 0)

10+ Year Member



Thanks .. that's what I was hoping.
But just for input .. someone in another forum did mention that Netscape 4x used to require it in order to render properly. I guess we don't worry about 4x anymore :-)

Jayell

Edouard_H

6:12 pm on Dec 27, 2004 (gmt 0)

10+ Year Member



For what it's worth in IE 5.0 <td>'s also fail to inherit attributes assigned to the <table>....

jayell

7:21 pm on Dec 27, 2004 (gmt 0)

10+ Year Member



That's worth a bunch .. I just removed all the <td> level class items, thinking I was safe. And I'm one of those that don't like to drop too many off the table when I design.

Thanks for the additional info.
Jayell

BonRouge

4:35 am on Dec 28, 2004 (gmt 0)

10+ Year Member



OK... I guess I was wrong...
(bows his head and walks away with tail between legs)

jayell

4:02 pm on Dec 28, 2004 (gmt 0)

10+ Year Member



That's what these forums are for .. we all learn something along the way. If you hadn't put in your opinion, you may never have learned that tidbit :-)

Jayell

Edouard_H

7:56 pm on Dec 28, 2004 (gmt 0)

10+ Year Member



we all learn something along the way

Yep, and with cross-browser issues it's often learned the hard way ;)

jayell

3:47 pm on Dec 29, 2004 (gmt 0)

10+ Year Member



For what it's worth in IE 5.0 <td>'s also fail to inherit attributes assigned to the <table>....

I had someone in another forum say that IE 5.0, 5.5, and 6.0 have problems inheriting from the BODY tag into the <td> tag, but that from <table> to <td> was fine. Do you know whether that's correct or not?

Jayell

jayell

3:47 pm on Dec 29, 2004 (gmt 0)

10+ Year Member



For what it's worth in IE 5.0 <td>'s also fail to inherit attributes assigned to the <table>....

I had someone in another forum say that IE 5.0, 5.5, and 6.0 have problems inheriting from the BODY tag into the <td> tag, but that from <table> to <td> was fine. Do you know whether that's correct or not?

Jayell

jayell

3:48 pm on Dec 29, 2004 (gmt 0)

10+ Year Member



Sorry for the double posting .. Jayell

MichaelBluejay

7:05 am on Dec 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you want to control linespacing, then you have to code the TD or Safari won't pick it up. Using <TABLE style="font:11px/150% Verdana"> will cause Safari to render the linespacing at 100%, not 150%.

Yes, this is a real annoyance.

jayell

3:49 pm on Dec 30, 2004 (gmt 0)

10+ Year Member



But I'd rather be slightly annoyed by knowing the right answer .. than annoyed after finding my site won't work in several browsers. I test in about 5 browsers .. but it never seems to be enough -)

Thanks
Jayell