You are here: Re: Center Table but not Caption! « HTML « IT news, forums, messages
Re: Center Table but not Caption!

Posted by Martin Jay on 05/03/06 02:55

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;
}

--
Martin Jay
Phone/SMS: +44 7740 191877
Fax: +44 870 432 5180

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация