l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2006 Dec 17 15:14

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Standards sticklership [Re: [vox-tech] Fwd: css: cell width andheight]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Standards sticklership [Re: [vox-tech] Fwd: css: cell width andheight]

> From: Peter Salzman <p@cbreak.com>
> I'm always amazed that I aced through a year of quantum field theory but CSS
> continually baffles me to no end.
> If I have some html tables, and set the height and width CSS property for
> each td element, is it guaranteed that each cell in each table will be the
> exact same height and width under all circumstances?
> If not, is there some way of saying "Look here, browser.  As Zeus is my
> witness, you will make this cell 3em by 2em no matter what!"

I'm pretty sure the answer is: no. I don't think there's a way to make
an absolute guarantee that your size will not change.

There's something you should know about CSS, too: it is a very powerful
and flexible stylesheet language, but it's not quite complete, and
support for it in any browser I can think of has never been, either
(this includes Firefox and Opera, though AFAIK Opera is the better of
the two in that regard). This and other W3C specifications insist that
CSS should always be used for formatting instead of things like tables,
and yet they have more or less failed to provide some of the /precise/
levels of control available via old-fashioned, reliable-but-deprecated
HTML table formatting (or, in some cases, mainstream support for CSS has
failed to provide the appropriate level of precise control demanded by
the spec). I am ignoring the "cheat" of using CSS to trick the browser
into thinking that a given element should be rendered as a table or
table cell: that amounts to pretty much the same thing, in the end.

For this reason, CSS is one of those things where it is often impossible
to be both pragmatic /and/ completely correct (from a standards
perspective). This actually is true of HTML itself in certain cases as
well. I myself am very much a standards stickler, and tried for years to
write only ever standard-conforming code (as I still pretty much
continue to do with C and C++). This is not possible in many

So: use CSS wherever possible. It is by far the best choice, where it is
reliably supported. Where you can't get CSS to do what you need it to on
all of your target browsers, don't be afraid to use HTML tables or other
tried-and-true tricks in defiance of W3C recommendations. Web markup and
formatting technologies is one of the worst areas for trying to match up
specifications with real-world implementations support :(

Still lamenting MSIE's abysmal support for the <object/> tag...

Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!