Hello fellow SO folks,
Beginner to HTML here.
I am at my wit's end and yet I can't get this working. Could you please have a look?
What I want is to push the text inside navleft to the leftmost side of hte viewport, center the contents of navcenter and push the contents of navright to the rightmost side of the viewport.
Whatever I do, the width of navcenter is only its contents, it doesnt fill the area between navleft and navright. I tried 1 million CSS 3-column options to no avail (negative margin, padding, etc).
I can't get rid of wrapper because it is used for sticyk footer (i left out the irrelevant code, body entries, etc.).
What can i do?
Maria
PS: Yes I know my CSS sucks, and it would look like a big mess to you, please excuse and bear with me. Thank you very much for your time.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>title</title>
<link href="2.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="wrapper">
<div id="headerMain">
<div id="header">
<div class="headerLogoLeft"></div>
<div class="headerLogoCenter"></div>
<div id="nav">
<div id="navleft">navleft</div>
<div id="navcenter">center</div>
<div id="navright">navright</div>
</div>
</div>
</div>
</div>
</body>
</html>
/* CSS Document */
* { margin:0; padding:0; border:0; }
html {
height:100%;
width:100%;
}
.wrapper {
min-height:100%;
height:auto !important;
margin:0 auto -26px;
background:#e9e9e9;
}
body{
font: normal 12px/16px Arial, Verdana, Helvetica, sans-serif;
height: 100%;
min-width:1024px;
width:100%;
border: 0px;
background-color:#CFCFCF;
}
#headerMain{
width:100%;
background:url(img/header_bg.png) 0 0 repeat-x;
color:#D2C7A3;
}
#header{
width:100%;
background:url(img/header_bg_top.png) 0 0 repeat-x;
margin:0;
height:153px;
}
.headerLogoLeft {
height:84px;
width:34%;
float:left;
text-align:left;
}
.headerLogoLeft img {
height:72px;
width:72px;
display:inline;
padding-top:5px;
}
.headerLogoCenter {
height:84px;
width:66%;
float:left;
text-align:left;
}
.headerLogoCenter img {
height:84px;
width:550px;
display:inline;
}
#nav {
width:100%;
height:33px;
color: #9E9E9E;
line-height:33px;
font-size:13px;
}
#navleft {
height:33px;
float:left;
width:200px;
text-align:left;
}
#navcenter {
height:33px;
line-height:33px;
text-align:right;
float:left;
}
#navright {
height:33px;
width:200px;
text-align:right;
float: right;
}