|
|
And lo on Tue, 06 Nov 2007 15:59:06 -0000, Invisible <voi### [at] devnull> did
spake, saying:
> 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?
What's wrong with this?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<style>
span.outer {border: red 1px solid; padding: 20px;}
span.inner {border: red 1px solid; padding: 10px;}
span.centre {border: red 1px solid; padding: 0px;}
</style>
<span class="outer">A<span class="inner">B<span
class="centre">C</span>D</span>E</span>
</html>
--
Phil Cook
--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com
Post a reply to this message
|
|