I'm working on a web design that has a fixed sidebar and breadcrumb header, and a scrollable content section taking up the remaining space. Here's what I envision the end result looking like:
The rub is, I can't figure out how to make this work without nasty container <div>
s or hacky CSS. I like semantic HTML (HTML 5, for this specific project) so I don't really want to budge on keeping styling elements out of the markup.
The sidebar will have two fixed widths (expanded and collapsed) and the header will always have a fixed height.
This is (essentially) how I'd like the markup to look:
<body>
<aside>
<!-- sidebar content -->
<h1>My Site</h1>
</aside>
<section>
<nav>
<!-- breadcrumbs -->
<a href="#home">Home</a>
<a href="#area">Area</a>
<a href="#category">Category</a>
<a href="#">Item</a>
</nav>
<article>
<!-- page content -->
<h2>Item Title</h2>
<p>
Item Content
</p>
</article>
</section>
</body>
Can someone help me make the CSS work for this?
Edit: My CSS thus far:
html {
font-family: "Segoe UI", sans-serif;
font-size: 9pt;
height: 100%;
}
html body {
margin: 0px;
height: 100%;
padding: 0px;
}
html body aside {
background-color: rgb(32, 80, 128);
float: left;
height: 100%;
width: 256px;
}
html body section {
background-color: rgb(16, 40, 64);
height: 100%;
margin-left: 256px;
}
html body section nav {
background-color: rgb(242, 242, 242);
height: 32px;
}
html body section article {
background-color: rgb(255, 255, 255);
margin: 0px 32px 32px 32px;
}
html body {
-- are you expecting a<body>
tag somewhere OUTSIDE of the<html>
tag?? – drudge Feb 18 '11 at 20:48