Jump to content

Div ID Container problems


dunc453

Recommended Posts

Hey

Im having some problems with Div ID containers.

 

http://www.ictkix.com/dlewis/externalsites/index.html

 

If you look at that in opera or safari the container works and it is displayed in the middle. But in IE and Mozilla the container clearly doesnt work.

 

This is the section of CSS that contains it:

 

#first_container
{
 margin: 0 auto 0 auto; 
 display: table; 
 height: 100%;  
 position: relative; 
 overflow: hidden; 
 width: 660px;
}

 

And the HTML:

 

 

Any help is much appreciated

Regards

Duncan :)

CONTENT

CONTENT
id="first_container">
Edited by dunc453
Link to comment
Share on other sites

This code should center the div when you have a doctype because it has a width and side margins auto:-

#first_container

{

margin: 0 auto 0 auto;

display: table;

height: 100%;

position: relative;

overflow: hidden;

width: 660px;

}

 

This code align="center" is old-fashioned; you should use an id or class with a width and side margins auto:-

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...