Forum Moderators: not2easy
body {
background-color: #FFFFFF;
margin:0px 0px; padding:0px;
text-align:center; /* Hack voor IE5/Win */
}
#wrapper {
width:760px;
margin:5px auto;
text-align:left;
background-color:#FFFFFF;
}
#header {
width: 760px;
height: 100px;
text-align: left;
border: thin solid #000000;
}
#hoofdnav {
width: 760px;
margin: 5px 0px 0px;
text-align: left;
border: thin solid #000000;
}
#linksNav {
width: 130px;
margin: 5px 0px 0px;
position: static;
float: left;
text-align: left;
border: thin solid #000000;
}
#content {
width: 625px;
margin: 5px 0px 0px 5px;
position: static;
float: left;
text-align: left;
border: thin solid #000000;
}
HTML:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
@import "css/layersdesign.css";
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="header">Hier komt de header</div>
<div id="hoofdNav">Hier komt de hoofdnavigatie</div>
<div id="linksNav">Hier komt de extra navigatie</div>
<div id="content">Hier komt de content</div>
</div>
</body>
</html>
Wiht Netscape 7, the content-box is positioned under the linksNav-box... What do i do wrong?
(and are there any good tutorials for css-positioning on the net, or maybee someone can recomend me a book?)
If you want the #linksNav to be floating left to your content, why are you then floating your content as well? That confuses the browser engine and you will see that diferent browsers interpret this differently.
There are many great tutorials out there. I modified your code in a way I think you wanted it:
body {
background: #fff;
margin: 0;
padding: 0;
text-align: center; /* Hack voor IE5/Win */
}
#wrapper {
width: 760px;
margin: 5px auto;
text-align: left;
}
#header {
width: 760px;
height: 100px;
border: thin solid #000;
}
#hoofdnav {
width: 760px;
margin: 5px 0;
border: thin solid #000;
}
#linksNav {
width: 130px;
float: left;
border: thin solid #000;
}
#content {
width: 625px;
margin: 0 0 0 135px;
border: thin solid #000000;
}
The key is to locate what does what and to use a minimal amount of code. That way you eliminate browser differntials and it will be easier to understand how everything works. Good luck!
[edited by: SuzyUK at 6:59 pm (utc) on Sep. 7, 2004]
[edit reason] tidying.. [/edit]
Try removing the borders and add a color instead, makes it easier to locate the problem. Also, make sure youve got all margins and floats correctly.