[thelist] Can't get CSS to work
Joe Crawford
jcrawford at avencom.com
Thu Apr 12 21:25:05 CDT 2001
Chris Evans wrote:
> I have this code:
> .footer {
> text-align: center;
> }
> <table width="300" border="1" align="center">
> <tr>
> <td class="footer">This text should be centered</td>
> In Netscape 4.7, the text is centered, but the table is left justified.
> Obviously something buggy in NS4.7. What is the best way to work around
> this, without resorting to using <center> tags in the text?
I have run into problems with the "align" attribute of <table> tags. In the
distant past I've seen nested tables with this attribute disappear entirely.
As a result I stay away with it. border, cellspacing, cellpadding (and
bgcolor, and background I guess) are all I'll use.
Alternative - enclose the table in <div align="center"></div>
If it's a nested table, put the align in the enclosing <td> -- like so: <td
align="center">.
> PS - Expect a lot more of these questions coming down the pipe as I flail
> around helplessly in the CSS morass, trying to learn to tread water.
Bookmark them validators, and fullspeed ahead!
Best of luck!
Joe <http://artlung.com/>
--
Joe Crawford |||||||||||||| mailto:jcrawford at avencom.com
|||||||||||||||||||||||| http://www.avencom.com
||||||||||||||||||||||||||| Avencom: Set Your Sites Higher
More information about the thelist
mailing list