[thelist] CSS for tables..

Marlene Bruce marlene.bruce at colemandesign.com
Thu Aug 24 16:05:12 CDT 2000


Rudy was recently bugging me offlist about where the h-e-double-toothpick I
am these days, so I thought I'd add my .02 to this thread.

> From: 	Eduardo Dominguez
>    Being new to css, i was wondering if i can apply a style
> to a whole table in the <table> tag and not in every
> <td> or <tr>. I want, if possible, to define cellpad, cellspace,
> width and font.
> 
> Is this possible ??
> 
Most of your question has been answered here-to-fore. I'll reiterate what
Rudy said about defining the CSS in your header, and not generally needing
to assign the attributes to each line. In the header (or even better - and
externally linked style sheet) is usually best practice.

Regarding font issues, the em unit is indeed just as unpredicatable, across
browser and platform, as Aard mentioned. As I recently responded to another
thread here, for one project I ended up having to develop four style sheets
(which included contents within nested tables) to accommodate just the 4.x
browsers and up. While theoretically the em should be best, you have to be
ultra-careful about the cascading of your tags. IOW, if you use ems to
assign a font size to the <p> tag, and also to the <td> tag, and then use
the <p> within the <td></td>, it will adjust size accordingly, which may not
be desirable. And then there is the problems you'll discover with
inconsistent browser support.

Point is more predictable, and might give more design control, but then
you've got problems with browser/platform differences, and the fixed font
size may impede your users with poor eyesight. Definitely check out Aard's
article.

One of my favorite references for CSS support is:

<tip type="CSS browser support reference" author="marlene">
An up-to-date CSS browser support chart, easy to understand (at least for
me, ymmv):
http://www.westciv.com/style_master/academy/browser_support/index.html
</tip>

Cheers,
Marlene





More information about the thelist mailing list