Welcome to Code Couch

Jeff’s profile

I'm a professional web developer working in London, UK and have been teaching, coding and mentoring HTML, CSS and Javascript since the early 90's. I work on large website projects during the day, and come home to enjoy Thai food, fine wines and the company of friends in the evening.

Posting history

  • Speed up your Javascript

    Nicolas Zakas (of Professional JavaScript, Second Edition fame) has a series of articles discussing improving Javascript performance - avoiding browsers complaining about long-running scripts. Some useful suggestions on how to optimise and chunk interactions.

  • Use CSS pseudo classes to enhance accessibility

    It is very simple to add some CSS rules to make your site more accessible. Read on to find out how you can use pseudo classes to provide extra support for keyboard users in all browsers (including Internet Explorer).

  • How do you vertically centre content using CSS?

    Find out how to do vertical centring (vertical alignment) of content using just CSS (and some div elements).

  • Problems tabbing through checkboxes and radios in MacOSX Safari

    Many people find it easier to use the tab key to cycle through the various fields of a form in a web page. If you are using a browser in MacOSX, you will find that you cannot use the tab key to access checkboxes or radio buttons... instead you have to use the mouse/trackpad. Read on for a solution.

  • Problems with anchors and alpha transparency filters in IE6

    If you use the Microsoft filter CSS property to allow support for an alpha transparent PNG on an element, any links directly within that element are not clickable (in Internet Explorer 6 only). The problem is explained and a solution put forward that will make your links clickable again.

  • How to create rollovers without using Javascript

    Using just CSS, you can do simple (and more complex) rollovers... no javascript required. This post shows how to apply this technique to your own pages with ease - whether it's a colour change or a more complex image swap.

  • Enabling cross-site scripting XSS via an iframe

    Communication from an iframe that has content from a domain other than the one the iframe is contained within is a constant source of frustration - as browsers prevent this kind of activity due to built-in security policies. Here is a technique to perform cross-site scripting (XSS) in just such an environment with example code and a real-world example.

  • How to use “clearfix” CSS to clear floats without markup

    Here we extended the normal rules for clearfix and provide a complete CSS solution to clearing floated elements (ensuring that a parent element inherits it's floated child element's height). A complete clearfix redux.

  • ReferenceError: console is not defined

    If you have recently upgraded to the free Firefox extension Firebug 1.2 - then you may have experienced some difficulties with console.log throwing the following: ReferenceError: console is not defined. Read on for an explaination...

  • Using AJAX to update the time on a web page from the server

    In an attempt to better explain how you can use AJAX to fetch some data from the server and display it on the web page, I have provided a self contained PHP file.