hi, Im trying to convert a site from a tables layout to a css layout. could someone give me a hand with a few issues?
Tables for layout version
and the CSS Version
issue 1 : in IE6 I cant seem to get rid of the gap between the header and the content / nav. seems fine in FF.
issue 2: what would be the best approach to deal with the gaps between the content / nav and footer? the tables version just 'stretches'
heres my css:
and the html:Code:body{ background-color:#666; } h2{ text-align:center; } #header{ text-align:center; height:202px; } #content{ position:absolute; background-image:url('images/layout_04a.gif'); background-repeat:no-repeat; background-color: #fff; padding-left:5px; width:526px; border-left:1px solid #000; } #wrapper{ display: block; margin-left: auto; margin-right: auto; width:782px; } #nav{ position:absolute; margin-left:527px; background-image:url('images/layout2_05.gif'); background-repeat:no-repeat; background-color:#333; width:255px; color:#666; } a.nav:link,a.nav:visited{ display:block; text-decoration:none; color:#666; width:95%; padding-left:10px; border-top:1px solid #000; } a.nav:hover{ background-color:#633; color:#fff; } #footer{ position:absolute; bottom:0; width:782px; text-align:center; height:100px; }
any help is MUCH appreciatedCode:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="style.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="wrapper"> <div id="header"> <img src="images/skin_02.gif" width="782" height="202" alt="det-tox" > </div> <div id="content"> <h2>...Future So Unclear</h2> <p>here we are then dfgdf dfgdfg fdgdafg dfg dfg fdsgdafg dfgd fag dfgd fag df gdfg dfg df gdf gdfgdf df gdfg dfg dfgd fgdty sf dh ffh sgh sfh sgh sdfhsfh fshsfg hdsfghf</p> <p>here we are then dfgdf dfgdfg fdgdafg dfg dfg fdsgdafg dfgd fag dfgd fag df gdfg dfg df gdf gdfgdf df gdfg dfg dfgd fgdty sf dh ffh sgh sfh sgh sdfhsfh fshsfg hdsfghf</p> <p>here we are then dfgdf dfgdfg fdgdafg dfg dfg fdsgdafg dfgd fag dfgd fag df gdfg dfg df gdf gdfgdf df gdfg dfg dfgd fgdty sf dh ffh sgh sfh sgh sdfhsfh fshsfg hdsfghf</p> </div> <div id="nav"> <a class="nav" href="#">Home</a> <a class="nav" href="#">Band</a> <a class="nav" href="#">Multimedia</a> <a class="nav" href="#">Gallery</a> <a class="nav" href="#">Contact</a> <a class="nav" href="#">Links</a> <a class="nav" href="#">Administrator</a> </div> <div id="footer"> <img src="images/foot.gif" width="782" height="100" alt="det-tox" > </div> </div> </body> </html>![]()







I tried it out, I'm gonna go through it later as well coz its nice, Had the gaps in IE6 under the header but Pauls #header img{display:block;} sorted that out, thanks m8. The only bit was if you add more content the Nav will only go so far then stop, but the rest seems to stretch fine with IE6, in FF the extra content goes under the footer and carries on down the page, maybe its fixable though.
Bookmarks