CSS Question
Erik Price
erikprice at mac.com
Fri Sep 19 21:01:18 EDT 2003
On Friday, September 19, 2003, at 10:04 AM, Cole Tuininga wrote:
> I would have imagined that with css (using inline style sheet defs), I
> would simply do this:
>
> <div style="text-align: center">
> <table ....>
> .
> .
> </table>
> </div>
>
> This works just ducky in Netscape 4.7x, but not my current version of
> mozilla. Does anybody know what I need to do instead? I don't want to
> static position the table, I would like it to be centered.
This problem has plagued me, I have solved it, and then I have
forgotten how I solved it and had it plague me again.
I am pretty sure that the workaround* is to use
<div style="margin-left: auto; margin-right: auto;">
<table ...>
.
.
.
</table>
</div>
But YMMV since I can't remember for sure. text-align only applies to
text.
Erik
* I find it ironic that workarounds in CSS are sometimes necessary,
since one of the reasons people sometimes use CSS is to avoid misusing
tables for composing a design in HTML, which was itself a workaround
for the limitations of HTML.....
More information about the gnhlug-discuss
mailing list