[thelist] Easy CSS Riddle
joe
stowaway at uklinux.net
Mon May 10 16:18:30 CDT 2004
Hi John
John.Brooking at sappi.com wrote:
>What I get is "Text 1" on the left, and "Text 2" on the right, as expected,
>but "Text 2" is to the right *and* on the next line, not the same line, as I
>expected. You probably want to know that I am looking at it in Win XP IE
>6.0, but I get the same results on Netscape 7.02. (Interestingly, Netscape
>4.7 places it almost, but not quite, all the way to the left on the next
>line, which is more than I expected.) I have tried playing with the widths,
>margins, and padding, and making the first SPAN float left, but to no avail.
>I present it here stripped to its bare essentials.
>
>
>
How about floating both?
<html>
<body>
<span style="width: 40%; float: left;">Text 1</span>
<span style="width: 40%; float: right;">Text 2</span>
</body>
</html>
> 3) Extra credit: What if I wanted some text on the left, the right, *and*
>in the middle, all on the same line?
>
>
>
some fantastic tutorials on 3 cols with headers and footers can be found at:
http://css.maxdesign.com.au/floatutorial/tutorial0916.htm
HTH
joe
More information about the thelist
mailing list