POV-Ray : Newsgroups : povray.off-topic : Small CSS question : Re: Small CSS question Server Time
14 Nov 2024 22:22:00 EST (-0500)
  Re: Small CSS question  
From: Nicolas Alvarez
Date: 6 Nov 2007 11:40:24
Message: <473098f8@news.povray.org>

> I have the following HTML:
> 
>   <span>A<span>B<span>C</span>D</span>E</span>
> 
> I've set up some CSS to put borders round span elements. It's supposed 
> to display as follows:
> 
>   +---------+
>   | +-----+ |
>   | | +-+ | |
>   |A|B|C|D|E|
>   | | +-+ | |
>   | +-----+ |
>   +---------+
> 
> However, no matter what I do, it actually renders like this:
> 
>   +-+-+-+-+-+-+
>   |A|B|C|D|E|F|
>   +-+-+-+-+-+-+
> 
> Any idea how I fix this?

I tried giving it both padding and margin, but didn't get what you 
wanted. However, display:block did the trick. It makes the span behave 
just like a div (and a div with display:inline would be identical to a 
span). You need to give it explicit width though; the default is 100% of 
the container block (the whole page in my test).


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.