Tag Archives: Css

Crouching Lemming Hidden Background

Lemmings

More CSS experimentation with the site. Hover over the menu bar up there. Go on, I’ll wait. Whee, Lemming!

The image is a simple animated GIF I put together after a quick Googling. Initially I just wanted to stick the Lemming somewhere unobtrusive on the page, but after a bit of experimenting there’s really nowhere you can put it that doesn’t get a bit distracting and annoying – there’s a reason always-on, auto-playing animations mostly died with Geocities. So I opted to stick it on the menu bar and only appear on mouse over. In itself that’s easy enough – add a “:hover” selector to the menu element and it’s done. But it looks a bit jarring just flicking on and off as you move the mouse around the page so I started looking into having it fade in and out. Since I’ve no idea how to mess with the actual code of a WordPress site or theme it had to be a CSS-only solution.

At first it wasn’t looking hopeful, since it really is the kind of thing people automatically go to Javascript for and with good reason. But eventually I unearthed the fact that Chrome supports transitions on background images. Woo! I did get tripped up by the fact that if you aren’t fading from another image (and one the same size at that) it not only fades but resizes as well. Easy fix, just use another image as the default non-hover background and fade from that.

The code is all below the cut.

Read More →


Success! Responsive goodness

Chiron Responsive Banner

Earlier I said I was going to have a crack at making the theme I use for Pixieland a little more responsive and you know what? I actually did it.

Clunky and coarse, yes, but now if the page width drops below the previous minimum of 960px things will get out of the way and let the width drop sanely to the content minimum of 640px. It actually looks kind of OK too, though I’m sure I’ve missed some inevitable side-effects of being a bit over-zealous with the CSS selectors I’ve overridden.
Read More →


Having a poke at responsive web design

Responsive Web Design Banner

Responsive design. You can’t go anywhere on the internet without tripping over the term. And what a wonderful thing it is. Using modern CSS and Javascript techniques to let the same site reflow its content to fit different window sizes, growing and shrinking, showing and hiding as needed. It makes for some truly slick sites and, perhaps more importantly, reduces the maintenance effort by having less code and design to maintain since you no longer have to have separate sites for different sizes and devices – at least not to the same extent you’re used to.

But how does it work? That’s what I wanted to know, and this article is the fruits of my – admittedly lazy – research. A simple style sheet for a bare-bones responsive page.
Read More →