473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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.  
Jul 1 '08 #1
1 1653
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>
Jul 1 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Mimo Zus | last post by:
I'm hoping that someone can explain what's going on; better yet provide a workaround. I'm designing a centered CSS site based on a 550 pixel wide vertical background image. Onto this background...
1
by: François de Dardel | last post by:
Still struggling with this. See http://mapage.noos.fr/dardelf3/tintin/page3bits.html I thought the good "Web Tips" pages posted by Spartanicus...
2
by: Max | last post by:
Hello - For some reason my js alert boxes are not centered. What is the syntax for positioning them? Thanks, Max
7
by: Eric Lindsay | last post by:
I would like to do a photo gallery with a liquid layout. I wanted to center a caption below each photo (or above each photo). I can do that easily with tables, but then I don't have a liquid...
5
by: Richard Shewmaker | last post by:
Hi. I've been using CSS for basic stuff, mostly concerning fonts. I want to get going with using CSS fully. Two days ago I purchased O'Reilly's "Cascading Style Sheets" and "CSS Cookbook." I've...
5
by: Chris Beall | last post by:
Objective: Using an HTML list, create a horizontal nav menu with these characteristics: - All menu items have the same width at all times. - When the window width is reduced, the menu items...
9
by: Troy Piggins | last post by:
If I use the code: ----- <div style="text-align: center;"> <a href="photos.php?img=xx1.jpg"> <img src="xx1.jpg" style="padding: 10px;" /> </a> <a href="photos.php?img=xx2.jpg">
5
by: totalstranger | last post by:
I'm working on a lightweight, auto width, auto centered, one level drop down menu. It's working in FF, IE7 and Safari (all windows versions on my local system), however it fails in Opera. Can...
7
saputello
by: saputello | last post by:
hello i am dying to get this page to look right. i seem to have tried everything, but don't see why the banner, footer and content don't sit perfectly centered on the page. Everything measures...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.