
Originally Posted by
Twey
[...] I can't get the .shaft DIV to stretch to fill its containing DIV vertically [...]
Place a container around the menu and content (hmm, already there...), and set the background image and colour on that container (you'll need to set an opaque background for the content to overlay the container).
An alternative, which is unworkable thanks to IE, would be to use a relatively-positioned container, and absolutely-position the menu rather than float it. With the top and bottom box offset properties set to zero (0), the menu would automatically stretch to the height of the container.
I can't think of any other solutions, at the moment.
[...] and that blasted twenty-pixel white gap above said .shaft DIV.
Remove the top margin of the level one heading.
As for the height, I used height: 100%, which I assumed to mean it would fill its containing DIV vertically, since it already has a width given by the taller of the two elements. However, it appears not.
Percentage values for the height property are computed against the height of the containing block, as you'd expect. However, the height property value of that containing block cannot be auto (the default), otherwise the nest element will use the auto value, too.
Though a percentage height property value can be computed from another percentage value,
Code:
#parent {
height: 100%;
}
#child {
height: 45%;
}
HTML Code:
<div id="parent">
<div id="child">
</div>
</div>
the computed value for #child is still contingent on the container for #parent having a value other than auto for its height property.
Note that there's one exception, here: the root element (that is, the html element). A value of 100% for the height property here will be computed to mean the height of the viewport. However, some older browsers get this wrong, though this shouldn't be a disasterous failure.
Other comments
Navigation is impossible without scripting enabled as the menu contents start in their hidden state. If your site is meant to showcase client-side scripts, this could be overlooked (perhaps). If not, the script that shows the menu should also be responsible for hiding it in the first place.
I think the borders are intrusive. The content gets just less than 60% of the width at 1024x768, and starts in the lower half of the viewport. It just seems unbalanced with the content seemingly relegated to the right-hand side, allowing the surrounding decoration to dominate.
Mike
Bookmarks