I have some nested divs which user percentages for sizing the width. The divs are floated for positioning which works fine. The problem is that one of the divs (sub-content) which contains two floated divs sized at 35% and 65% does not occupy the same width as the divs above and below it, resulting in the border being out of line with everything else. this is what it looks like in firefox:
http://www.tracethisbook.com/images/firefox.tiff
and here's what it should look like, as displayed in safari
http://www.tracethisbook.com/images/safari.tiff
The relevant code is below. I've included a few small bits of inline styling as well as relevant CSS so I didn't have to include all of the CSS files.
<div class="content">
<div class="content_header"><h2 class="header_text">View Traces</h2></div>
<div class="nav">
<!-- nav bar stuff -->
</div>
<div class="internal_content">
<div class="sub_header rounded_top"><h2 class="sub_header_text">Details for Trace</h2></div>
<div class="sub_content">
<div class="book_details">
<div style="float:left"><img class="book_cover" src="" /></div>
<div style="float:left" class="trace_details">
<table class="info">
<!-- table displaying book details -->
</table>
</div>
</div>
<div id="trace_details">
<table class="list">
<!-- table shown more info -->
</table>
</div>
</div>
<div class="sub_footer rounded_base"></div>
</div>
.content{
border-style:solid;
border-width:1px;
border-color:022c82;
margin-left:1%;
margin-bottom:10px;
padding-bottom:10px;
background-color:white;
}
.internal_content{
width:98%;
padding:10px;
}
.sub_header{
width:100%;
background-image:url(/images/sub_header.gif);
height:30px;
}
.sub_footer{
width:100%;
background-image:url(/images/sub_header.gif);
height:30px;
clear:both;
}
.sub_content{
border-style:none solid none solid;
border-width:1px;
border-color:bebeff;
padding:5px;
height:auto;
float:right;
}
.book_details{
width:35%;
float:left;
clear:left;
}
.trace_details{
width:65%;
min-width:300;
}
I think I've including everything above. Does anyone have any idea why this renders fine in Safari, but not in Firefox. Also, in Opera, the trace_details and book_details divs render with their smallest possible widths and the border on the sub_content div is even further out of line. Any help would be greatly appreciated.
Thanks,
Kev