<html>
<head>
    <title>Div example</title>
<style type="text/css">
.clear{
  clear: left;
}

.container {
  width: 400px;
  padding: 20px;
  margin: 0;
  border: 1px dotted #ff0000;
}

.left {
  float: left;
  width: 170px;
  padding: 10px;
  border: 1px solid #000000;
  text-align: left;
  background: #ffff00;
  margin-left: 30px;
  display: inline; /* required otherwise margin-left is doubled in IE */
}
</style>
</head>

<body>
<div class="container">
  <div class="clear"></div>
  
  <div class="left">
    Inner block:<br />
    width=170px<br />
    padding=10px<br />
    margin-left=30px
  </div>

    Outer block:<br />
    width=400px<br />
    padding=20px<br />
    margin: 0

  <div class="clear"></div>
</div>
</body>
</html>