design.css
body {
background-color: #666666;
margin-left:500px;
margin-right:500px;
margin-top:10px;
margin-bottom:20px;
font-family:Verdana, Geneva, Tahoma, sans-serif;
font-size:12px;
color:white;
}
div.header {
background-color: #333333;
}
div.navigationBar {
border:0;
border-style:solid;
background-color:#112211;
}
div.navigationButton {
border:1px;
border-color:#ffffff;
border-style:solid;
background-color:#112211;
padding:15px;
width:100px;
height:40px;
text-transform:uppercase;
overflow:hidden;
font-weight:bold;
text-align:center;
}
.navigationBar ul {
list-style-type:none;
padding:1px;
}
.navigationBar li {
display:inline;
float:left;
}
.navigationButton a
{
text-decoration:none;
color:#eec600;
display:block;
}
.navigationButton a:link {
text-decoration:none;
}
.navigationButton a:hover {
color:#ffe811;
}
homepage.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="pl" http-equiv="Content-Language">
<link rel="stylesheet" type="text/css" href="design.css"/>
</head>
<body>
<div class="header" style="height:200px; width: 800px;"></div>
<div class="navigationBar" style= "height:73px; width: 800px;" > /* added unit to the height property */
<ul>
<li><div class="navigationButton" ><a href="#link4">Button4</a></div></li>
<li><div class="navigationButton" ><a href="#link5">Button5</a></div></li>
<li><div class="navigationButton" ><a href="#link6">Button6</a></div></li>
</ul>
</div>
</body>
</html>
Why is there a space between the header div and the navigationBar? Any feedback or suggestions for improvements are greatly appreciated.
The strange gap appears in web browsers (but not in jsFiddle). I have tested this code on Firefox and IE.