Posts written by Paul McCarthy

Top 10 CSS3 commands

By Paul McCarthy on 12 August 2010

Whilst recently updating our advanced CSS training course to include some CSS3 commentary, I became inspired by the amount of CSS3 that’s already out there. Browsers such as Firefox and Safari have really started embracing CSS3, which means that there’s a significant audience that you could be demonstrating your CSS3 skills to.

I have put together Top 10 CSS3 commands, some of which are fairly widely known and also some that personally I find interesting (Box-sizing - Old school box model).

Please let me know what you think and also any sites that you’ve seen using CSS3 as well.

What’s your favourite Firebug feature?

By Paul McCarthy on 2 June 2009

Tags:

I think it’s probably fair to say that we (CSS developers) owe the people who created Firebug a big wet kiss. But there are still people muddling on without this wonderful Firefox toolbar.

The more time I’ve spent with Firebug, the more I’ve come to rely on it and the more I discover it can do. So it’s got me thinking, maybe there’s stuff it does that I just haven’t discovered yet.

So I’d like you to take a moment to tell me your firebug top tip, that really saves you time. It doesn’t matter how small or obvious. To get the ball rolling here are two features I love:

net-panelThe net panel - amongst other things it ensures you aren’t referencing any missing files plus checking things aren’t taking too long to load. Great for making sure you haven’t referenced any old files and that everything is neat and tidy.

box-modelThe lovely layout panel - more obvious but so useful. Just inspect an item and it’s margin, border, padding are shown as a box model diagram! Brilliant.

Let us know what your favourite Firebug feature is?

CSS pseudo class tip

By Paul McCarthy on 12 May 2009

Tags:

Having contributed to a feature in last month’s Web Designer Magazine on great CSS secrets, we thought that the blog would be a great place to share the tip we came up with for clearing a float container without extra HTML mark up:

If a floated element is nested within a box that has a border or a background colour applied to it, the floated element will not force its container to stretch all the way down (mainly in standards compliant browsers).

To force the container box to enclose the floated div(s), it needs a ‘cleared’ element added after the last floated div. Rather than adding extra HTML mark up such as a clearing div or paragraph we can use CSS.

Using the pseudo-class :after it’s possible to add content at the end of an element with the following CSS commands:

#id:after {
content:".";
clear: both;
height: 0;
visibility: hidden;
display: block;
}

Sometimes the container will also collapse in Internet Explorer. Unfortunately IE still doesn’t support the :after pseudo-class yet, so a simple declaration of height: 1% to the floated containing div will stop it from collapsing.

#id {
height:1%
}