Skip to content

Instantly share code, notes, and snippets.

@gotoplanb
Created November 29, 2012 04:51
Show Gist options
  • Save gotoplanb/4166871 to your computer and use it in GitHub Desktop.
Save gotoplanb/4166871 to your computer and use it in GitHub Desktop.
<html>
<head>
<style>
body {
background-color: #dddddd;
}
#container {
background-color: #ffffff;
margin: 0 auto;
width: 960px;
}
header h1 {
float: left;
margin-left: 10px;
margin-top: 10px;
}
nav {
margin-left: 340px; /* enough margin to be wider that the image it's trying to get past */
}
nav ul {
list-style-type:none;
padding-top: 10px;
}
nav ul li {
float: left;
margin-bottom: 10px;
margin-right: 10px;
}
nav li a {
background-color: #cccccc;
display: block;
padding: 10px;
text-decoration: none;
width: 260px;
}
nav li a:hover {
background-color: #aaaaaa;
}
article {
clear: both; /* to ensure the article starts below the logo and the nav */
padding: 10px;
}
aside {
background-color: #eeeeee;
float: right;
margin-top: 70px;
padding: 10px;
width: 320px;
}
footer {
color: #aaaaaa;
font-size: 10px;
text-align:center;
}
</style>
<body>
<div id="container">
<header>
<h1 class="logo">
<img src="http://i.imgur.com/ldAL5.gif" alt="Fix it" width="320px" />
</h1>
<nav>
<ul>
<li><a href="foo.html">Foo</a></li>
<li><a href="foo.html">Foo</a></li>
<li><a href="foo.html">Foo</a></li>
<li><a href="foo.html">Foo</a></li>
</ul>
</nav>
</header>
<article>
<aside> <!-- the aside has to come first because of how floats work -->
<iframe width="320" height="200" src="http://www.youtube.com/embed/bNxvXj9nff4?rel=0" frameborder="0" allowfullscreen></iframe>
<p>A caption or whatever else you want.</p>
</aside>
<h2>This is my page heading most likely</h2>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
</article>
<footer>
<p>Whatever</p>
</footer>
</div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment