Tagged: CSS

Sticky footers

Not to be confused with stinky feet, sticky footers are a CSS technique whereby a page footer always appears at the bottom of the page/window, even if the content of the page isn’t tall enough to fill the window completely. (For you HTML-phobes out there, normally all of the content on a web page flows vertically one element after another, meaning that your page “footer” can potentially end up in the middle of the window, with a bunch of blank space below it, if your page content is too short. Not to be confused with Too Short.)

I have seen sites whose owners had solved this problem, but as it’s never really been an issue for me (since I never have too little content to fill a page, I guess!), I haven’t bothered to dig into the solution, until today, when I needed to for work.

The Man in Blue (also known as Australian author and self-identified “web technologist” Cameron Adams), has posted an elegant solution, which has also been floating around in various forums. Read more »

OK, winter, we get it

I knew it was probably coming, so it wasn’t a total shock. But still… I woke up this morning to this:

Ugh. It will most likely have melted by noon, I suppose. Not that that will do much to repair my severely damaged psychological state.

Even worse, I’m annoyed that the default CSS for the new WordPress gallery functionality uses float: left so when there are only two images, it doesn’t center them, but leaves a nice, perfectly-sized void where a third photo would have gone. I’ll have to fix that. Speaking of voids, my annoyance (and distraction) at snow and CSS is somewhat compensated for by the smooth “electronic breakbeat jazz” grooves of Revolution Void.

Update, 8:13 AM: Great, now it’s actually snowing more. Take that, global warming! (Yes, please check out that site, if for no other reason than to prove that just because your URL is “globalwarming.org” doesn’t mean you’re a benevolent non-profit trying to save the world.)

OK, Microsoft, you’re off the hook…

ballmer_tongue.jpgBut not in the way that the Cheat is off the hook.

I fixed the IE6 CSS problem I ranted about yesterday, and it was perhaps one of the more satisfying solutions I’ve encountered where IE is concerned, because all it required was that I remove a few lines of CSS code that turned out to be unnecessary anyway.

My approach to CSS is one of building a solid page structure and then fine-tuning the details until I have exactly what I want. A side effect of this is that sometimes I leave in unnecessary definitions along the way. If they don’t alter the output in the browsers I test (Firefox always, Safari often, IE7 at least once or twice along the way), then it’s good.

But in this case I had an entire definition that was completely unnecessary. It wasn’t hurting anything in Firefox or Safari, but it was doing all sorts of crazy crap in IE6. Naturally, in such a situation, I blame Microsoft. Read more »

Thanks, Bill… this is just how I wanted to spend my Saturday

Bill, I really don’t have time for this.

Internet Explorer 6 is incapable of properly rendering CSS applied to a <div> tag when the only child element in the <div> is a table. It sticks arbitrary margins in the document below the table. Here’s an example from a site I’m working on (colors removed to [sort of] protect anonymity). This is how it should look, as rendered by Safari:

Safari screenshot

The concern is the content in the dark title bar. The bar itself is a <div> and the two buttons plus the month/year text is contained in a table. Here’s how it looks in Internet Explorer 6 (note the gap below the header bar):

Internet Explorer screenshot 1

Read more »