I'm in the process of creating a basic informational website using HTML and CSS, with a columned layout using the 960 grid system.
However, I'm encountering an issue when trying to align my header (which includes a logo image as a background using CSS) to the left and the navigation list to the right. The content below shifts upwards and overflow:hidden isn't resolving it. I've attempted using clear fix classes from the 960 grid and clear:both but they are not having any effect.
If anyone can identify what I might be doing incorrectly, please advise.
Here's the CSS:
/**** =header ****/
header {
overflow: hidden;
}
header h1 {
background: url(../img/logo.png) no-repeat;
text-indent: -9999px;
height: 23px;
width: 174px;
float: left;
}
/**** =nav ****/
nav {
float: right;
}
nav li {
display: inline;
}
/**** =banner ****/
.banner {
background: url(../img/city-bg.jpg) no-repeat;
width:695px;
height:231px;
}
.callout {
background: black;
height: 231px;
}
And here's the HTML:
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/text.css">
<link rel="stylesheet" href="css/960_12_col.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container_12"> <!--start container - using the 960 grid-->
<header>
<h1>White + Black</h1>
<nav>
<ul>
<li><a href="home.html">Home</a></li>
<li><a href="ourservices.html">Our Services</a></li>
<li><a href="howwework.html">How We Work</a></li>
<li><a href="testimonials.html">Testimonials</a></li>
<li><a href="workexamples.html">Work Examples</astyle=></li>
</ul>
</nav>
<div class="banner gird_10">
<p>
Some placeholder text.
</p>
</div>
<div class="grid_2 callout"></div>
</header>
<div class="main">
<div class="grid_5">
<h3>Services We Offer</h3>
<p>
Placeholder text for services offered.
</p>
<p>
Additional information about services.
</p>
<p><a href="#" class="button">Read More</a></p>
</div>
<div class="grid_5">
<h3>How We Work</h3>
<p>
Information about our work ethic.
</p>
<p>
Details on how we operate.
</p>
<p><a href="#" class="button">Read More</a></p>
</div>
</div>
<div class="grid_2">
<blockquote>
<p>
Some sample quotation text.
</p>
</blockquote>
</div>
<footer>
<p><strong>Black + White</strong> themes via <a href="www.themeforest.net">ThemeForest</a></p>
</footer>
</div> <!--end container-->
</body>