<h1 style="border-bottom: 1px solid #000;">outer test <span style="float: right;">internal test</span></h1>
In Opera 8.53, the "internal test' text is pushed to the right side by side with the "outer test" text.
But in IE6/Firefox 1.5, the "internal text" will be pushed down as though it's a new block element itself. (And this can be accomplished by setting "outer test" to block element too.
As I'm currently using negative margin tops for the "internal test" to be pushed up to be side by side with the "outer test" for IE and Firefox, any idea how to work around the limitation so it will work in both (or all browsers)? And without additional markup, that is.
I see the same results as you describe and couldn't figure out a workaround using floats. Not sure which browser is correct - but the example in red at the end of 9.5.1 states:
This HTML fragment results in the b floating to the right. <P>a<SPAN style="float: right">b</SPAN></P> If the P element's width is enough, the a and the b will be side by side. It might look like this: [pic of how your example looks in Opera].
So Opera is probably right, but then on the other hand the spec also says that float:right generates a block box so why should it still appear "inline"?
Complicated issue. Sorry I'm no help. The only way I achieved something like what you want (the Opera behaviour) was to set position:relative on the h3 and position:absolute; right:0; on the span. So not using floats at all.
I'm hope someone else can shed some light on this.