Connecting Tech Pros Worldwide Help | Site Map

CSS Centered in FF, Safari... not in IE

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 1st, 2008, 05:35 PM
Newbie
 
Join Date: Aug 2007
Posts: 15
Default CSS Centered in FF, Safari... not in IE

I'm having trouble centering an image and a embedded video... Its centered on Safari and FF... but for some reason IE is being annoying... heres the code:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <head>
  3.  
  4. <style type="text/css">
  5.  
  6. body {
  7.        text-align:center;
  8.        background-color: black;
  9.         }
  10.  
  11. #container {
  12.     margin: 0 auto;   
  13.     text-align: left; 
  14.     position:absolute; 
  15.     width:100%; 
  16.     margin-left: auto;
  17.  
  18.  }
  19. </style>
  20.  
  21. </head>
  22.  
  23. <body>
  24.  
  25. <DIV id="container">
  26. <DIV style="position: absolute; top:0px; left:0px; width:00px; height:0px;">
  27.     <table>
  28.       <tr>
  29.            <td><img src="entirepage3.jpg" alt="About Us Pic" name="aboutus">
  30.  
  31.         </td>
  32.       </tr>
  33.     </table>
  34.   </DIV>
  35.  
  36. <div style="position: absolute; top:290px; left:300px; width:0px; height:0px;">
  37.     <table>
  38.       <tr>
  39.         <td><object><param name="allowfullscreen" value="true" >
  40. <param name="allowscriptaccess" value="always" >
  41. <param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=890103&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1">
  42. <embed src="http://www.vimeo.com/moogaloop.swf?clip_id=890103&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1"
  43.  type="application/x-shockwave-flash" 
  44. allowfullscreen="true" allowscriptaccess="always" width="400" height="240">
  45. </embed>
  46. </object>
  47.         </td>
  48.       </tr>
  49.     </table>
  50.   </DIV>
  51. </DIV>
  52. </body>
  53.  
Reply
  #2  
Old July 1st, 2008, 06:44 PM
Newbie
 
Join Date: Aug 2007
Posts: 15
Default

i think i figured it out... let me know if there's any bugs.... here it is

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3.  
  4. <style type="text/css">
  5.  
  6. body {
  7.        text-align:center;
  8.        background-color: black;
  9.         }
  10.  
  11. #container {
  12.     margin: 0 auto;   /* align for good browsers */
  13.     text-align: left; /* counter the body center */
  14.     position:relative; 
  15.     width:1009px; 
  16.     height:800px;
  17.     margin-left: auto;
  18.     margin-right: auto;
  19.  }
  20.  
  21.  
  22. </style>
  23.  
  24.  
  25. </head>
  26. <body>
  27.  
  28. <DIV id="container" class="container>
  29. <DIV style="position: absolute; top:0px; left:0px; width:00px; height:0px;">
  30.     <table>
  31.       <tr>
  32.            <td><img src="entirepage3.jpg" alt="About Us Pic" name="aboutus">
  33.  
  34.         </td>
  35.       </tr>
  36.     </table>
  37.   </DIV>
  38.  
  39. <div style="position: absolute; top:290px; left:300px; width:0px; height:0px;">
  40.     <table>
  41.       <tr>
  42.         <td><object><param name="allowfullscreen" value="true" >
  43. <param name="allowscriptaccess" value="always" >
  44. <param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=890103&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1">
  45. <embed src="http://www.vimeo.com/moogaloop.swf?clip_id=890103&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1"
  46.  type="application/x-shockwave-flash" 
  47. allowfullscreen="true" allowscriptaccess="always" width="400" height="240">
  48. </embed>
  49. </object>
  50.         </td>
  51.       </tr>
  52.     </table>
  53.   </DIV>
  54. </DIV>
  55.  
  56.  
  57.  
  58.  
  59. </body>
  60.  
  61. </html>

Last edited by eWish; July 2nd, 2008 at 02:47 AM. Reason: Fixed code tags
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.