|
Posted by sorry.no.email on 05/03/06 03:11
On Wed, 3 May 2006 00:55:35 +0100, Martin Jay
<martin@spam-free.org.uk> wrote:
>In message <uhpf52d8amjg3il1p7dmfhsmd4mfcbopv4@4ax.com>,
>sorry.no.email@post_NG.com writes
>
>>Some of the tables on the site are centered, not all, and I have
>>centered this particular table using:
>>
>>.centered-table {
>> margin-left: auto;
>> margin-right: auto;
>>}
>>
>>This is fine but the Caption remains firmly at the extreme left,
>>presumably obeying the general caption rules (text-align) above it:
>>
>>caption {
>> padding: 0 0.6em 0.8em;
>> font-size: 1.3em;
>> font-weight: bold;
>> text-align: left;
>> color: #000;
>> background: transparent;
>>}
>>
>> Can anybody suggest a work-around for this?
>
>Well, one work-around would be to give the <caption> a class, such as
>this:
>
><caption class="caption_centre">
> 1848 Census
></caption>
>
>And in the CSS:
>
>.caption_centre{
> text-align: center;
> margin-left: auto;
> margin-right: auto;
>}
Hi Martin,
Thanks for this! I have changed it to
..caption_centre{
text-align: left;
margin-left: auto;
margin-right: auto;
and this has produced the desired effect: centered on page but aligned
left with respect to the table top.
Thanks very much!
Andrew.
Navigation:
[Reply to this message]
|