Since you're just learning CSS, I advise that you ditch the framework and code things from scratch.
Lucky for you, I'm bored at work with nothing to do :) I coded up the whole thing for you. You can see it at http://kevinvancrawford.com/temp/test.html
The markup:
<div id="container">
<div id="head">
<h1><a href="./test.html">Site Banner</a></h1>
<form id="login">
<label for="email">Email:</label>
<input type="text" name="email" id="email" />
<label for="password">Password:</label>
<input type="password" name="password" id="password" />
<input type="submit" value="Login" id="submit" />
</form>
</div><!--head-->
<div id="body">
<div id="primary">
<div id="blue"></div>
<div id="yellow"></div>
</div><!--primary-->
<div id="column">
<div id="green"></div>
<div id="red"></div>
</div><!--column-->
</div><!--body-->
</div><!--container-->
And, the CSS:
#container { width:960px; margin:1em auto; background-color:#EEEEEE; padding:20px 20px 0; }
#head, #login, #body { /* these elements all contain floats */
overflow:hidden; /* This will clear the contained floats. "auto" works too */
width:100%; /* Triggers hasLayout in IE, needed to clear floats */
}
#head h1 {
float:left;
margin:0;
width:500px;
height:80px;
background:#000000 url(./img/logo.gif) no-repeat; /* Instead of using an <img> tag, we used CSS to replace the HTML text with an image. Good for SEO */
position:relative;
}
#head h1 a {
position:absolute;
display:block;
top:0; left:0;
width:100%; height:100%;
text-indent:-9999px; /* Hides the text. The properties above make the whole <H1> a link */
overflow:hidden;
}
#login { float:right; width:320px; padding:1em 0 0; }
#login label, #login input { float:left; display:block; margin:0 5px 5px 0; }
#login label { text-align:right; clear:left; width:80px; }
#login input { width:150px; }
#login #submit { width:auto; }
#primary { float:left; width:620px; margin-right:20px; }
#primary #blue { background-color:#000080; margin:20px 0; min-height:300px; }
#primary #yellow { background-color:#FFFF66; }
#column { float:right; width:320px; }
#column #green { background-color:#008040; }
#column #red { background-color:#800000; }
#yellow, #green, #red { min-height:200px; margin:20px 0; }
Please ask if you would like me to explain any of it for you :)
Also, though I didn't use it in this example, I recommend Eric Meyer's reset.css. Google it.
Please note, the only compromise I made was that I didn't align the "login" button to the right edge, because that would necessitate floating all of those elements to the right, and the <input>
s would have to go before the <label>
s in the markup, which I have reservations about.
Cheers,
Kevin
Kevin C.
2009-10-22 23:43:58