tags:

views:

91

answers:

4

I have two span elements that I would like to stay on the same line. In FF and other browsers, my code works fine but in IE6 it breaks. Can someone please tell me what I am doing wrong?

Here is the code I am using:

<span style="font-family:Arial;text-align:left;font-size:30px;color:#06a;">test</span>
<span style="font-family:Arial;float:right;font-size:12px;color:#06a;text-align:left;">This is the line that jumps down and needs to be brought level with the above span element.</span>
A: 

The block using float:right should be first in HTML

Philippe Leybaert
Thanks for the answer Philippe
+1  A: 

you should use "float:left" on the first span.

Donnie C
Thank you so much Donnie! It worked.
Anything to ease another csser's pain!
Donnie C
A: 

Just a quick note: span, by default, isn't block-level.

Most bugs in IE6's CSS rendering have well-known workarounds and have been well documented here.

As an aside - is IE6 support really important to your site? IE6 use has been dropping sharply lately, and many sites are dropping support for it.

Jeff
A: 

test This is the line that jumps down and needs to be brought level with the above span element.

just add float:left; the first span

Moksha