Thank you. I thought I might have to end up doing it that way !

Tim

On 23/02/2011 20:01, Chetan Crasta wrote:
On Thu, Feb 24, 2011 at 1:21 AM, Tim Dawson<t...@ramasaig.com>  wrote:
I have a three-column (fixed width) layout which requires a heading in each
column. The lengths of the headings may vary. I am trying to centre each
heading using 'margin: 0 auto 0;', but can't make it work unless I set a
specific width on the heading. This leaves two of them off-centre as some
are longer than others.

What is the best way to deal with this, please ?

I could set an individual specific width on each heading, of course, but
that's inflexible and hard to maintain.


Try display:inline on the heading element and text-align:center on its
parent element.

~Chetan



--
Tim Dawson
Maolbhuidhe
Fionnphort
Isle of Mull  PA66 6BP

01681 700718

______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to