This is some text in a floating div.

Text text text text text text text text text text text text text text text text text text text text text text text

This is the title

You'll notice that, as you'd expect, the bottom border "underline" on the header's box goes under the floating DIV (you can see the line though the DIV because no background color is set in the DIV). How do I get that pesky H tag's box to behave as if it were an inline element and just stop at the edge of any float it bumps into?

But, this did work.





The stylesheet:

h1 { border-bottom: 1px solid #000000; }
div.float { float: right; width: 200px; border: 1px dotted #ff0000; margin: 1em; }