Wait, what? How can you center text in an inline element? If inline the
element is the same size of the text, so technically it's centered, aligned
left/right and justified! :)

Just to make sure we are on the same page, I'm talking about this:
<h1 style="text-align:center">My Centered Text</h1>

not this:
<div style="text-align:center">
<h1>My Centered Text</h1>
</div>

Kevin

And yes, I reply failed again...

On Wed, Feb 23, 2011 at 3:50 PM, Tim Dawson <t...@ramasaig.com> wrote:

> Good question. In theory it doesn't work on block elements unless you also
> apply 'display: inline', but in practice it does (in Firefox, at least, I've
> yet to try others).
>
> Tim
>
>
> On 23/02/2011 20:55, Kevin A. Cameron wrote:
>
>> What's wrong with text-align:center on the header element itself?
>>
>> Kevin
>>
>
> --
> 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