blob: a6fb5ee752e2cf1464ea619e0923c3bae455cadf [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>CSS Floats: Shrink Wrapped Right Floats With Right Aligned Text</title>
<style>
.control { display: inline; font: 1em/1 Ahem, sans-serif; background: red; color: white; }
.container { width: 40%; padding: 0; margin: 1em; border: solid black; font: 2em/1 Ahem; height: 1em; width: 1em; background: red; }
.test { text-align: right; float: right; clear: right; color: green; }
</style>
</head>
<body>
<p class="control">Ahem_font_required_for_this_test.</p>
<p>The following two boxes should look identical.</p>
<div class="container"> <div class="test">x</div> </div>
<div class="container"> <div class="test"> x </div> </div>
</body>
</html>