Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tatey/105451 to your computer and use it in GitHub Desktop.
Save tatey/105451 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='en-US' xml:lang='en-US' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>IE float bug</title>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<style type='text/css'>
body {
font-family: Helvetica, sans-serif; }
#container, #left, #right1, #right2 {
/* Does not help */
zoom: 1;
position: relative; }
#container {
margin: 50px auto;
width: 500px;
padding-right: 220px; }
#right1, #right2 {
float: right;
clear: right;
width: 200px;
margin-left:20px;
margin-right: -220px;
margin-bottom: 20px;
background: blue;
color: white; }
#left {
background: #ccc;
border: 1px solid red;
padding: 0 10px; }
</style>
<body>
<div id='container'>
<div id='right1'>
floaty 1
</div>
<div id='right2'>
floaty 2
</div>
<div id='left'>
<p>
<strong>The two elements on the left should appear after each other, not stacked on top. Also they should be 20px to the right of this element, not directly beside it.</strong>
</p>
</div>
</div>
</body>
</head>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment