css Archive

Introducing the Flexible Box Layout module

I’ve got a new post up at CSS3.info: Introducing the Flexible Box Layout module. It’s an overview of an alternative layout module which is already implemented in Gecko and WebKit.


QA Style Sheet

This is such a clever idea: a stylesheet which highlights common HTML problems, helping you QA your sites before you publish them. Nice work by Jens Meiert.


Print-style headlines with CSS 3

I was admiring the layout of a front page splash of a newspaper supplement yesterday, and realised that with (some) modern browsers we can replicate the effect using CSS alone. I’ve knocked together a quick demo using the transform property which is available in Firefox 3.5 and Safari 4.

The best thing about it is that it uses only a single block-level element, so nicely degrades to a heading only.

Read the full article


New background rules in Firefox 3.6

The latest alpha release of Firefox 3.6 (3.6a1) contains some new rules for providing backgrounds to elements: multiple background images, background-size, and an implementation of the Webkit gradient proposal (modified from the original – more on that later).

I’ve put together a very rough demo of what you can do with these new rules; you’ll require a recent build of Firefox 3.6 or Webkit to view it. Try resizing the window to different dimensions, and see how it changes.

Here’s an explanation of how I did it:

Read the full article


background-size implemented in Firefox 3.6

Firefox 3.6 has become the latest browser to support the CSS3 background-size property (although the first to do so according to the latest W3C spec.).

Using it is pretty simple:

div {
background-image: url('image.png');
-moz-background-size: 80%;
}

This, along with multiple background-images, is going to go a long way towards cleaning up mark-up and prettifying the web.


Bad advice: people still teaching CSS hacks

There’s so much great stuff written about web standards available for free on the web that it’s easy to forget how much bad stuff is also out there; and how many people are willing to support it just because it’s easier than putting in a little extra effort to follow best practice.

Over the weekend one of the most popular stories on Delicious.com was teaching the use of lazy CSS hacks, the type of which I thought everybody was convinced enough to do away with; the star and underscore hacks for targeting IE6 & IE7, the hacks which we’ve been saying (for years) shouldn’t be used anymore.

Disregarding the ‘rights’ and ‘wrongs’, and the validation argument – some of my stylesheets don’t validate, and there are good reasons for that – I’d like to give a few other reasons why using this method is not a good idea.

Read the full article


Newer | Older

Aside

I’ve updated my Speaking page to include more conferences, more videos, and a little on my speaking requirements and preferences. I’m planning to cut down on the number of talks I give in 2014 (twelve is too many), but am always open to interesting offers and opportunities, so please get in touch if you’re organising an event.

[#] 1 Comment . More Asides.