At present i am using ie9 to render my web pages. While using the 'margin: 0 auto' css property for one of my requirements, it did not work.So i surfed a lot and found the reason, i did not specify the doctype in order to turn off the quirks mode. So that i added a doctype which was specified in the link. as a result my web page is not seems to be loading as it is. It is omitting some css and scripts [jquery] that was binded with it.
when ever i try to load the webpage by removing the doctype, it is displaying all the contents normally, but margin: 0 auto not seems to be working..
By the way,This link states that jquery will responds differently to quirks mode turned off and on.so i tried to change my scripts too. but same result occured.
I am very confused at this stage. Any clues.?
EDIT:
HTML:
<html>
<head>
<title>Rajaprabhu</title>
<link rel="stylesheet" type="text/css" href="css/PrabhuCss.css">
</head>
<body>
<div id="DivMenu">
<div id="DivLogo">R</div>
</div>
<div id="DivMain">
<div id="DivHeader">
</div>
<div id="DivContent">
<div id="DivSlider">
<div id="DivHome">
</div>
<div id="DivSkills">
</div>
</div>
</div>
<div id="DivFooter">
</div>
</div>
</body>
</html>
CSS: [PrabhuCss.css]
#DivMain
{
position: relative;
width:100%;
height:100%;
z-index:1;
}
#DivFooter
{
position:absolute;
width:100%;
height:5%;
bottom:0%;
left:0%;
background-image: url('../Images/ImgHeaderFooter.jpg');
z-index:5;
border-top: 2px solid #2F2E2E;
}
#DivHeader
{
position:absolute;
width:100%;
height:10%;
top:0%;
left:0%;
background-image: url('../Images/ImgHeaderFooter.jpg');
z-index:6;
border-bottom: 2px solid #2F2E2E;
}
#DivMenu
{
position:absolute;
border-radius: 999px;
background: #ccc;
border: 2px solid #2F2E2E;
cursor: pointer;
z-index:7;
text-align:center;
width: 4%;
height: 8%;
left: 48%;
top: 6%;
}
#DivLogo
{
font-family: 'Wendy One', sans-serif;
font-size:35px;
position:relative;
top:50%;
margin-top: -18px;
}
#DivContent
{
position:relative;
width:100%;
height:85.02%;
top:10%;
left:0%;
z-index:2;
overflow: hidden;
}
#DivSlider
{
position:absolute;
width:100%;
height:100%;
z-index:3;
}
#DivHome
{
width:100%;
height:50%;
z-index:4;
background-image: url('../Images/ImgBackground.jpg')
}
#DivSkills
{
width:100%;
height:50%;
z-index:4;
background-image: url('../Images/ImgBackground.jpg')
}
body
{
margin:0;
padding:0;
border: 0;
overflow:hidden;
}
If i use <!doctype html>
in the top of my Html, the page is not displaying properly.
But with out that there wont be any problems in rendering.