Ok, on to the CSS… Break it down…
First I have my reset – browsers do not start with the same default paddings/margins/borders on elements, so it’s usually handy/easier to just set the offending elements up front. There are larger resets, but those tread into the area of being frameworks instead of resets – massive ones like Eric Meyer’s “Reset Reloaded” being one of the worst offenders on that, or as I like to call it “You give resets… a bad name”.
Likewise there are smaller resets, like the ‘universal selector’ reset of * {margin:0; padding:0} – which pretty much shtups styling form elements beyond repair.
My reset is in the middle, the nice safe middle ground. Reset JUST the margins and padding on the offending cross-browser elements, strip the border off the TWO offending elements there… and done. Being only 250 bytes, I really don’t sweat it, it’s certainly less code than saying “padding:0; margin:0” every time I use one of those elements.
HR – I hide all HR on the page as I tend to use borders for that on other elements for “screen”. To me, HR are to – as the HTML 3 description used to say – “indicate a change in topic”. They make the document make sense for user agents where CSS means nothing… when we have our nice screen appearance, we don’t need 'em, so get rid of 'em.
.plate,
.leadingPlate,
.trailingPlate – my standard content containers for plate images. The first one gets set to block and centered, the next two are floated with enough margin to look nice. I then set a border and box-shadow on all three for consistency sake. The box-shadow doesn’t show on older browsers (IE8-) – it’s a minor visual effect that frankly, is not essential to the page working, so OH WELL. IE8 and lower don’t get the shadow, whatever will we do. Naturally, someone will pipe in suggesting using some fat bloated javascript shiv as a fix; they’re what I like to call… well, I’ll be nice, I won’t say it.
body – set the default font, set the background… and here’s the big trick, I put your tiled sidebar background HERE. Since you seemed to be designing for full screen instead of the typical “box in the middle” this means no extra elements were needed for this. I give it a bit of a push down from the top to make it line up with the end of the header area a bit more.
h1 – I set the font size to 100% so we can scale “small” properly… and set up the tiled background. If you want to go back to the tiled version you had, it would go here. Since it’s the first element, I recreated that top border you had here.
h1 span – The large text next to the image ends up needing the extra span container just to make all the padding’s play nice. I set this to a px font due to the image interaction – letting it resize automatically can result in a broken layout… and besides, NOBODY is going to kvetch about 44px being “too small”. I put the logo image here just once because to my sensibilities, it just looked better. To switch back to what you had, just drop that background and play with the paddings on this element. The display:block is there just to let us set paddings. I also did a text-transform to uppercase since I liked that better – long term I’d consider maybe using some form of web-font or image-replacement here for better branding.
h1 span span – The hyphen I put in there for non screen.css users we just take right out of the equation with display:none; – being just a single hyphen, nobody’s gonna mistake that for content cloaking. Also helps that some screen readers will now ignore the hyphen.
h1 small – like the span, this gets display:block so we can play with paddings properly. I left this as dynamic font and boosted it a bit. Borders, colors, your background image, nothing too fancy needed here.
#columnWrapper – this element serves two purposes in this layout. The first is to contain our floats so the footer will behave. The second is to apply a minimum and maximum width so that when the page is too small the layout doesn’t break, and when it’s too big you don’t have sentences that are too long to read.
The overflow:hidden is a natural trigger for float wrapping behavior, probably the simplest there is. Unfortunately old versions of IE don’t obey it, but there’s a oft used ‘trigger property’ hidden in IE called “haslayout”. Triggering ‘haslayout’ on an element can often fix rendering oddities in legacy IE on that element OR it’s children. For more about haslayout I suggest you google it, there are endless articles on the subject. For now, let’s just say that for some reason tripping haslayout makes an element wrap floats inside it instead of collapsing/pretending they aren’t there. Notice I use the IE proprietary ‘zoom’ property. Technically it’s invalid CSS and people used to jump through all sorts of hoops to try and make valid CSS with haslayout triggers. Given the plethora of proprietary values people are slapping on pages these days with all the -webkit and -moz properties, it’s really hard to justify not simply saying “FINE, I’ll just use zoom”… so zoom it is.
I declared the min-width in PX because I’m aiming for 800px wide physical devices… I always take 48px off for things like borders and scrollbar, hence the 752px. Technically you could get away with 40px and cover 99% of what’s out there… or you could go down to 32px which many people use – but is that extra 8-16px really gonna kill us? I think not.
The max-width I declared in EM’s since I’m doign that to prevent lines of text from being too long… since EM’s get bigger based on the user’s preferences, saying PX there would mean large font (120dpi) users (like myself) would get less characters per line than a small font (96dpi) user.
It’s kind-of unusual to set these values so deep into the page as usually there’s an outer-wrapper to handle this… but with the fullscreen layout this made more sense.
* html #columnwrapper – the comment says it all:
/* IE6/lower know not the min/max-width, so give them a crappy litle stripe */
We could fake it with an expression there, but it’s really just not worth the effort. The page WORKS for IE6 users, leave it at that. You waste too much time making it behave in decade old browsers the same as it does in new ones, you just end up with a fat bloated train wreck of a page. Graceful degradation, as fancy stuff becomes available make it available for people with the new stuff, and let the people with the old stuff still get a usable page.
#sideBar – simple floated column layout. I set the width wider than you had because the text was wrapping at larger sizes and was hard to fit… It also helps to use multiples of 2, 4, 8 or 16 as computers deal with exponents of two, particularly those, better than other values. 192 = 16*12
#mainMenu – I took a lot of stylistic liberties here because the text was illegible over that background. First I just kill the bullets and give it some padding. I also set the font as px here. Verdana is a ‘large font’, tends to be bigger than other fonts at the same font-size… because of the narrow px width column using %/em is just asking for a broken layout for large font users, so much like on the H1 px is our answer. Really even 144dpi users won’t complain about 14px verdana being too small – so it’s an acceptable sacrifice.
Doesn’t mean I like it… Does mean I’ll do it.
#mainMenu li – thanks to IE7, LI suck. BAD. Life gave me lemons I’m going to burn down life’s house with lemons BAD. Anchors inside LI in IE7 can do all sorts of funky height-shifting nonsese if you try to style them, so unless I HAVE to use them (like in a cascading menu) I set them to display:inline, which seems to strip away all that nastyness – and then pretend that they aren’t even in the markup.
#mainMenu a – again, display:block lets us play with paddings properly, padding and margin are nothing special. Text-decoration to strip the underlines, and I gave them some color, a border and some cutesy CSS3 effects.
#mainMenu a:active,
#mainMenu a:focus,
#mainMenu a:hover – hover effect… nothing too fancy there.
Content – another behavior overflow:hidden trips is that on block level elements after a float, if the content is taller than the float it won’t indent back in… very desirable in a column based layout… Using this means we don’t even need to state widths here… also very desirable for our semi-fluid layout. Again, legacy IE doesn’t do this, but haslayout trips the same behavior. From there just a wee bit of padding to make things pretty.
Content p – paragraphs by default use margin-bottom (though not in ALL UA’s) – I prefer padding so I don’t have to deal with margin collapse issues. Since we’ve already got a nice padding on our parent container, all we need here is to pad the bottom. pad the top of the container and the bottom of the paragraph, it’s a million times simpler than figuring out how overlapping margins are gonna add up.
Content ul – your inline list. Since you want them inline the auto-bullets aren’t gonna fly, so turn bullets off much like you were, but instead of putting them in the markup, I choose to use a background image for this. Bullets aren’t consistent in appearance cross-browser anyways, and this also lets you change it to any shape you want. (always nice). I give it the same bottom padding as paragraphs so everything spaces out the same, and I pump the line-height to 200% so they space out like you had the two separate lists doing.
Content li – I float these into a lines instead of inline-block so I don’t have to play with any extra properties… simplest solution is usually best. I used a 6px wide image, but only add 4px extra padding difference on the left side because for some reason there’s always an extra 2px in the kerning after the last character… dunno why, but all font engines seem to do this. Apart from that, it’s pretty simple.
Content h2 – I assumed most H2 would be styled the same as your home page one, just without the image or maybe with different images… so get the ‘common’ stuff like size, color and bottom margin out of the way.
Content h2.lifeHeading – the unique one with the image. Again I remastered the image; here’s a BIG tip, NEVER use an image larger than you’re going to show it and certainly NEVER let browsers handle the resize – they suck Cave Johnsons lemons at it. I add 44px total top/bottom padding meaning so long as the font ends up more than 16px tall (which our 150% pretty much guarantees) the image won’t get chopped off top and bottom.
Content h3 – padding, size, color… nothing to write home about.
Content a,
#footer a – Just the styling common to both areas. I dislike setting a globally at the top because :visited can make a royal pain out of itself on things like menus. Notice I set the visited state and even tacked on some nice hover states. I always trap :active and :focus so keyboard users aren’t left out in the cold. Technically all browsers should be using :focus for that, but some legacy browsers use :active instead… This can result in the ‘hover’ state being stuck in some browsers when you navigate back to the page from the link – but it’s a small price for usability.
blockquote – the quote… I did NOT make the text smaller as even at large fonts what you were doing caused massive usability issues. Instead I put quote marks in the markup and just indented it, retaining the different color. I would consider maybe giving it a different background-color, but not sure how that would look.
#onDuty – same bottom padding as para/ul…
#onDuty span – just bold and color, again, simple.
#footer – I clear floats just in case some browser decides overflow and haslayout aren’t enough, use margin to push it in on the left past the sidebar background image, and on the right just to make it even, pad the top and bottom to be pretty, and give it the dividing border. Simple.
… and that’s it… how I’d code that same page. I hope this helps you and that you’ll be able to glean some useful information from it.
Ooph, took me longer to write the description of the CSS than it did to write the CSS.