Posted By

stratton on 08/23/10


Tagged


Versions (?)

ie7 positioning bug


 / Published in: HTML
 

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  3. <title>Insert title here</title>
  4. <style type="text/css">
  5. #header{
  6. height: 200px;
  7. background: #ffff00;
  8. width: 100%;
  9. border: 1px solid #000;
  10. }
  11. #menu_container{
  12. margin: 100px 0 0 20px;
  13. position: relative;
  14. }
  15. #absolute_div{
  16. top: 10px;
  17. background:none repeat scroll 0 0 #FF0000;
  18. height:200px;
  19. position:absolute;
  20. width:500px;
  21. z-index:100;
  22. }
  23. #relative_div{
  24. height: 300px;
  25. background-color:#D6F3FF;
  26. width: 200px;
  27. position: relative;
  28. }
  29. </head>
  30. <div id="header">
  31. <div id="menu_container">
  32. <div id="absolute_div">absolute div</div>
  33. </div>
  34. </div>
  35. <div id="body">
  36. <div id="relative_div">relative div</div>
  37. </div>
  38. </body>
  39. </html>

Report this snippet  

You need to login to post a comment.