John Hughes

Simple responsive JavaScript

There are lots of ways of creating a responsive navigation menu, but many of them involve using JavaScript to detect browser size. This is my method, which produces a collapsible menu on smaller screens without relying on JavaScript techniques for size detection.

22 April 2012 · Posted in CSS, JavaScript, Mobile · Share on Twitter

Tools I use all the time

Since I started making websites, I have been building up a list of useful tools, scripts, and other bits of software that just make my job a little bit easier. This is my current list.

18 April 2012 · Posted in Web · Share on Twitter

Query without jQuery

One of the great advantages of using jQuery is that it makes it easy to select a set of elements on the page using the familiar syntax of CSS. But did you know you can also do that without jQuery?

14 April 2012 · Posted in JavaScript, Standards · Share on Twitter

Adding multiple load events

This is an old tip, but it’s still useful. With a simple function, you can add multiple load events to a page while maintaining cross-browser compatibility.

8 March 2012 · Posted in Browsers, JavaScript · Share on Twitter

Touch icons demystified

If you have ever struggled to get your site’s icons working on smart phones, you should definitely check out Mathias Bynens’s excellent post on touch icons. A simple, clear explanation that leaves us with no excuse for our missing icons.

5 March 2012 · Posted in Mobile · Share on Twitter

Doing more with links

We all know how to write a link to another page or a link to an email address. But did you know that you can also make a phone call or send a text message with a hyperlink?

2 March 2012 · Posted in HTML, Mobile, Web · Share on Twitter

My new favourite clearfix

You can avoid unnecessary empty elements and awkward overflow issues when clearing floats with a few short lines of CSS.

25 February 2012 · Posted in CSS · Share on Twitter

Image compression with PNGGauntlet

A quick and easy way to make your site a bit faster is to optimize your images. I can strongly recommend taking a look at PNGGauntlet, which reduces PNG file size without affecting image quality.

18 February 2012 · Posted in Design · Share on Twitter

Speed up your site with compression and caching

If your site is hosted on a Linux server, you might be able to speed it up a bit with a couple of easy .htaccess tricks.

12 February 2012 · Posted in Web · Share on Twitter

Fix the prefixes

There’s been a lot of noise on the web today over the possibility that several browser vendors are considering supporting a proprietary prefix so that websites made by stupid people will look pretty on their platform. This is a bad thing.

9 February 2012 · Posted in Browsers, CSS, Standards, Web · Share on Twitter

Hello

My name is John Hughes and this is my personal site where I write about web design and development and anything else I find interesting.

Read more