Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 27th, 2012  |  syntax: None  |  size: 1.05 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How do you center a div in Firefox and IE?
  2. <html>
  3. <body bgcolor="black">
  4. <center>
  5. <div style="width:1080px;height:288px;">
  6. <img src="declined.png" width="1080" height="288" alt="" style="z-index:0;position:absolute;" ondragstart="return false"/>
  7. <img src="cover.png" width="1080" height="288" alt="Declined."" style="z-index:1;position:absolute;" ondragstart="return false" />
  8. </div>
  9. </center>
  10. </html>
  11.        
  12. <div style="width: 1080px; height: 288px; margin: 0 auto; position: relative">
  13.    <img ... >
  14.    <img ... >
  15. </div>
  16.        
  17. <!DOCTYPE HTML>
  18. <html lang="en-US">
  19. <head>
  20.     <meta charset="UTF-8">
  21.     <title></title>
  22. </head>
  23. <body>
  24.     <div id="main" style="width:1080px;height:288px;">
  25.         <img src="declined.png" width="1080" height="288" alt="" style="z-index:0;position:absolute;" ondragstart="return false"/>
  26.         <img src="cover.png" width="1080" height="288" alt="Declined."" style="z-index:1;position:absolute;" ondragstart="return false" />
  27.     </div><!-- end div main -->
  28. </body>
  29. </html>
  30.        
  31. #main{
  32.     margin: 0 auto;
  33.     width:1080px;
  34.    height:288px;
  35. }