Hi,
When I set the outside div to 100% and both the inside div and table to 100% the internal table is not the same size as the internal div. The internal table is about 2px less to the right. Anyone know why this happens?
Also on the 2nd table in IE there is a big gap between the infobar2 and the table, i have no idea why. Any helps is much appreciated
Here is the actual code:
/*-------------------------------------------Main Content---*/
#mainContent {
float: left;
width: 79%;
}
/*---Top Nav---*/
#mainContent #topNav {
border: 1px solid #8AD12B;
float: left;
width: 100%;
background: #fff;
padding-bottom: 7px;
margin-bottom: 10px;
}
#mainContent #topNav h1 {
background: #D7EFB6;
padding: 6px 15px;
border-bottom: 1px solid #8AD12B;
}
#mainContent #topNav div {
padding: 10px;
width: 80%;
float: left;
margin-right: 0px;
margin-left: 8px;
display: inline; /* for IE 6 and below */
}
#mainContent #topNav div.topnav1 {margin-left: 15px;}
#mainContent #topNav div.topnav3 {width: 80%;margin: 0;}
#mainContent #topNav div h2 {padding: 10px 0 7px;}
#mainContent #topNav div ul {
list-style: none;
}
#mainContent #topNav div ul li {
margin-bottom: 0.40em;
color: #7d7d7d;
font-size: 85%;
}
#mainContent #topNav div ul li a {
color: #6EA427;
font-size: 120%;
}
/*---Info Bar---*/
#mainContent #infoBar {
background: #D7EFB6;
border: 1px solid #8AD12B;
float: left;
width: 100%;
margin-bottom: 10px;
}
#mainContent #infoBar h1 {padding: 6px 15px;}
#mainContent #infoBar h1 span {
font-weight: normal;
padding-left: 78px;
color: #666;
}
#mainContent #infoBar2 {
background: #D7EFB6;
border: 1px solid #8AD12B;
border-bottom: 0px;
float: left;
width: 100%;
}
#mainContent #infoBar2 h1 {padding: 6px 15px;}
#mainContent #infoBar2 h1 span {
font-weight: normal;
padding-left: 78px;
color: #666;
}
/*-------------------------------------------Left Nav & Right Nav---*/
* html #mainContent table {width: 100%;} /* Hack for IE 6 and below */
#mainContent table {
background-color: #fff;
padding: 3px 15px 10px 22px;
margin-bottom: 10px;
border: 1px solid #8AD12B;
width: 100%;
list-style: none;
}
#mainContent table td {
padding: 0px 4px 4px 10px;
margin-bottom: 0.20em;
color: #7d7d7d;
font-size: 85%;
}
#mainContent table td a {color: #6EA427;font-size: 120%;}
</style>
<body> <!--Main Content-->
<div id="mainContent">
<div id="topNav">
<h1>Find great things.. </h1>
<div id="topNav3">
Find great things
<br/>
</div>
</div>
<div id="infoBar2">
<h1>a</h1>
</div>
<table>
<tr>
<td><a href="#">asd</a></td>
</tr>
</table>
<div id="infoBar2">
<h1>b</h1>
</div>
<table>
<tr>
<td><a href="#">bcv</a></td>
</tr>
</table> </div>
<!--//Wrapper-->
</body>
Cheers Ke