hi people back again :(
i am having an issue with my div elements lining up all nicely in ie but in chrome they second row of divs are slightly moved to the right. It is really confusing me as to why this is happening, i am not sure if it is the css or the html why this is happening.
I will post the code for both my css and the html hopefully someone has come across this before and can point me in the direction of a tutorial or something that will help me understand why this is happening.
html code
<body bgcolor="#08a2c0">
<div id="container">
<div id="body">
<div id="header">
<h4>sonic hydro</h4>
</div>
<div id="nav">
<ul id="navigation">
<li><a href="index.html">home</a></li>
<li><a href="page1.html">Link1</a></li>
<li><a href="page2.html">Link2</a></li>
<li><a href="page3.html">Link3</a></li>
<li><a href="page4.html">Link4</a></li>
<li><a href="page5.html">Link5</a></li>
<li><a href="page6.html">Link6</a></li>
</ul>
</div>
<div id="body_main">
<div class="body_panel">
<h4>main body</h4>
</div>
<div class="body_panel">
<h4>main body 2</h4>
</div>
<div class="body_panel">
<h4>main body 3</h4>
</div>
<br />
<div class="body_panel">
<h4>main body 4</h4>
</div>
<div class="body_panel">
<h4>main body 5</h4>
</div>
<div class="body_panel">
<h4>main body 6</h4>
</div>
<div class="clear"></div>
</div>
<div id="footer">
<h4>address</h4>
</div>
</div>
</div>
</body>
</html>
css layout code
#container{
width : 100%;
margin-left : auto;
margin-right : auto;
margin-bottom : auto;
background-color : #08a2c0;
vertical-align : middle;
}
#body{
width : 75%;
margin-left : auto;
margin-right : auto;
background-color : #08a2c0;
padding-top : 0;
padding-left:0;
}
#header{
width : 100%;
margin-left : auto;
margin-right : auto;
background-color : #0F0;
padding : 0;
border-bottom : solid #FFF;
}
#nav{
width : 100%;
background-color : #60F;
border-bottom : solid #FFF;
text-align : center;
}
#body_main{
width : 95%;
margin : auto;
background-color : #96C;
border-left : solid #FFF;
border-right : solid #FFF;
text-align : center;
}
.body_panel{
width : 25%;
border : solid #FFF;
margin : .1em;
padding : .1em;
display : inline-block;
}
.clear{
clear : both;
}
#footer{
width : 100%;
background-color : #fff;
text-align : center;
}
css styles code
#header h4{
font-family:Tahoma, Geneva, sans-serif;
font-size:1em;
}
#nav h4{
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:1.5em;
}
.body_panel h4{
font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size:1.25em;
}
#footer h4{
font-family:"Lucida Console", Monaco, monospace;
font-size:.75em;
}
/* NAVIGATION STYLING */
#navigation ul{
list-style : none;
}
#navigation li{
display : inline;
font-family : "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size : 1.5em;
}
#navigation li a{
display : inline-block;
padding : .2em;
text-decoration : none;
font-weight : bold;
color : #FFF;
}
#navigation a:link{
color : #F60;
}
#navigation a:visited{
color : #FFF;
}
#navigation a:hover{
color : #F0C;
}
#navigation a:active{
color:#F00;
}