Web development

Using the CSS3 flexbox layout on 23 Mar 13 (3 comments)

The CSS flexbox is a future CSS3 layout module that aims to make CSS page layout much simpler. It makes it easy to create flexible, stretchy layouts.

Using CSS3 multi-column layouts to split a list into columns on 17 Mar 13 (Add comment)

How to use the new CSS multi-column layout feature to split a list across multiple columns.

Web debugging on windows on 24 Jul 12 (Add comment)

some tools and techniques that make it much easier to debug what your wayward application is doing.

Debugging IIS7 requests with windows event tracing on 23 Jul 12 (Add comment)

The windows event tracing can give detailed information about what has happened to a broken request that fails before or after it gets to the IIS7 pipeline.

Debugging the IIS7 integrated pipeline with failed request tracing on 18 Jul 12 (1 comment)

Failed request tracing is a handy IIS7 feature for debugging what’s happening when there are problems with modules or handlers in the IIS pipeline.

Javascript function declarations vs function operators on 14 Jul 12 (4 comments)

A look at the differences between the javascript function declaration and the function operator syntax.

Simulating network latency with Fiddler on 11 Jul 12 (Add comment)

How to use the Fiddler proxy to simulate HTTP response latency to test how your website works over a slow connection.

The HTML5 audio tag on 29 Dec 11 (2 comments)

Now the new HTML5 audio element has pretty decent browser support it is starting to be a pretty compelling alternative to using Flash.

Maintainable CSS presentation slides on 31 Jan 11 (2 comments)

A talk that I gave at the Developer, Developer, Developer day in Reading in 2011 about my experiences trying to make CSS easier to maintain. Contains slides and sample downloads.

Javascript method context on 29 Nov 09 (5 comments)

In languages like C# and Java you never really need to give a thought to the this operator. In javascript things are a little more complicated due to functions being first class objects.

CSS3 Multiple background images on 23 Nov 09 (8 comments)

How to use the CSS3 multiple background syntax to create complex, scalable and beautiful backgrounds for HTML elements.

IE6 absolute positioning in parent with odd width on 07 Sep 09 (Add comment)

A small browser quirk for IE6 where absolute positioning with the CSS right property is one pixel out when the parent container has an odd number of pixels.

Building javascript minification into MSBuild scripts on 29 Aug 09 (Add comment)

How to use a tool called Packer.NET to build javascript minification into a MSBuild script.

Why I don't like reset stylesheets on 23 Aug 09 (7 comments)

I don’t much like reset stylesheets. They make extra work when creating CSS and are an extra request for the browser to make to build a page.

Javascript prototype chaining on 17 Aug 09 (4 comments)

Prototype chaining is used to build new types of objects based on existing ones. It has a very similar job to inheritance in a class based language.

SVG images as CSS backgrounds on 12 Aug 09 (11 comments)

SVG images are an interesting options for CSS backgrounds because they’re small to download, easy to create and have many powerful features that aren’t possible using CSS3 alone.

A great big welcome to inline-block! on 09 Aug 09 (4 comments)

Inline-block is a halfway point between setting an element’s display to inline or to block. It keeps the element in the inline flow of the document like display:inline does, but you can manipulate the element’s box attributes (width, height and vertical margins) like you can with display:block.

Our web 2.0 wedding on 01 Aug 09 (2 comments)

The story of how Joe and I used our favourite web tools to organise our wedding and share the experience with the people who couldn’t be there.

Javascript object prototype on 18 Jan 09 (18 comments)

The javascript object prototype is javascript’s way of sharing implementation across similar objects, much like the way classes are used to do this in many other languages. Although constructor functions look a lot like classes, javascript does not have a class based object system like C# or Java. Instead it has a prototype based object […]

Javascript null or default operator on 09 Dec 08 (2 comments)

A neat little trick I learnt from Ting is a way to check whether a value was null or undefined using the or operator (||). It’s really simple. If valueThatMightBeEmpty has a value set, you get that value. If it is null you get the default. It’s just like the ?? operator in C#: var […]

Changing firebug’s font size on 16 Nov 08 (Add comment)

One problem I’ve had a couple of times when using Firebug to show things during code demos is I haven’t been able to make the font big enough for people at the back to read it. I found the solution at stack overflow: 1. Open firebug in new window 2. Go to the view->text size […]

Dust-me selector tool for finding unused CSS selectors on 21 Oct 08 (2 comments)

My find for today was a Firefox extension called Dust-Me Selectors from the SitePoint guys that scans a web site looking for unused selectors in the CSS. It extracts the style references for the current page and then looks at the page to see where they are used. It can look at the current page […]

CSS3 box-sizing attribute on 20 Oct 08 (23 comments)

CSS3 is going to include a new attribute called box-sizing so we can choose whether the width set on an element will include borders and padding or whether borders and paddings will be added to the width. The difference is basically the difference between the IE5 and W3C box models. The default will still be […]

Javascript closures on 17 Oct 08 (12 comments)

Javascript closures are a really powerful feature of the javascript language. Closures are created when a function that’s nested inside another function accesses a variable from its parent’s scope. This is really useful for passing state around your application when the inner function is called after the outer function has exited. Javascript supports functions nested […]

Constructor functions on 14 Sep 08 (8 comments)

The object literal syntax is great for setting up one off objects but sometimes you’ll want to mass produce objects that all have the same properties and methods. It would be a pain to have to set up each object individually so instead you can use a constructor function to do it for you. There’s […]