Previous Message
Next Message

Re: [css-d] <span style="text-align: center"> not working

Sent by Ian Leckie on 24 April 2002 14:02


On 4/24/02 12:59 PM, "Dunstan Orchard" [EMAIL-REMOVED]> wrote:

> I can't understand why the following code won't center the text inside
> the span? Any ideas as to what I'm doing wrong? (popped pre tags
> around it just for this email).
> 
> <pre>
> 
> <p>Your search for <em>xhtml</em> found the following documents (of 89
> documents searched).
> <br />
> <span style="text-align:center;">XHTML BOOK NOW OUT</span>
> <br />
> Displaying documents 11-20 of 44, with best matches first:</p>
> 
> </pre>

span is an inline element. inline elements are only as large as whatever
they contain. since the span is only as wide as your text, text-align is
meaningless. as far as how to achieve the effect you are after, I'm not
quite sure, aside from using three paragraphs and adjusting the top and
bottom margins accordingly.


---
Ian Leckie
Interactive Developer
The Integer Group
[EMAIL-REMOVED]
p: 515.247.2646
c: 515.710.2646
Previous Message
Next Message

Message thread: