Forum Moderators: not2easy
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>position test</title>
<style type='text/css'>
#right {float:right;}
</style>
</head>
<body>
left text
<div id='right'>right text</div>
</body>
</html>
Also, could you elaborate on what you said about semantic correctness? I try to comply to the standards, but I don't know of a spec that says not to do this. And what exactly is the rule? The body is a block element so your previous definition is not thorough
<div>
<span> This is some text</span>
<p> But now I am in a block element</p>
</div>
so I just want to say, I did run it through a validator, and it's valid.
I do have one follow-up question: is it still a bad idea if the wrapper for "left text" is an inline-block?
The offsets (left, top, width, height) are the same for both versions except for top, which increases when the element moves down (as expected).
The bug was gone when I turned on my computer this morning; I can't get it back, and I can't figure out what's different.