Absolute DIV over a html-select (IE6 BUG)


/ Published in: HTML
Save to your folder(s)

In Internet Explorer 6 (IE6) there is a bug to make div absolute positioned over select. The select will show over the div.
One solution is to place a empty iframe behind the div with same size.

The source below is a div as container to positioned it. In it there is a iframe und over it a div with the content.

It works fine with IE6, IE7 and FireFox3.5


Copy this code and paste it in your HTML
  1. </head>
  2. <select style="height: width:50px;">
  3. <option>test</option>
  4. </select>
  5.  
  6. <div style="position: absolute; left: 20px; top: 5px; height: 100px; width:100px;">
  7. <iframe style="position: absolute; top: 0; left: 0; height: 100%; width:100%; border: 0;"></iframe>
  8. <div style="position: absolute; top: 0; left: 0; background: white; height: 100%; width:100%;">
  9. My Content
  10. </div>
  11. </div>
  12. </body>
  13. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.