Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

<table align="center">

0 views
Skip to first unread message

Pavils Jurjans

unread,
Nov 21, 2002, 5:03:22 AM11/21/02
to
Hallo,

Using this HTML I was able to force the table to be aligned in center:

<table align="center">
<tr>
<td>
Something
</td>
</tr>
</table>

Now, what's the equivalent in CSS, so I could do

<style type="text/css">
<!--
.myTableClass {background-color: #808080; text-align: center}
-->
</style>

<table class="myTableClass">
<tr>
<td>
Something
</td>
</tr>
</table>


As I tried in this example above, using text-align propery doesn't help.

Thank you,

-- Pavils


Andrew Minre

unread,
Jan 3, 2003, 5:25:01 PM1/3/03
to
Hello Pavlis,

The best answer I've found is to put the table inside
a centered DIV tag like this:

<div style="text-align: center"><table>...</table></div>

Cheers,
Andrew

>-----Original Message-----
>Hallo,
>
>Using this HTML I was able to force the table to be
aligned in center:
>
><table align="center">
><tr>
><td>
>Something
></td>
></tr>
></table>
>
>Now, what's the equivalent in CSS, so I could do
>
><style type="text/css">
><!--

>..myTableClass {background-color: #808080; text-align:

center}
>-->
></style>
>
><table class="myTableClass">
><tr>
><td>
>Something
></td>
></tr>
></table>
>
>
>As I tried in this example above, using text-align
propery doesn't help.
>
>Thank you,
>
>-- Pavils
>
>

>.
>

0 new messages