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.
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.
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?
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.
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.
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?
My new favourite clearfix
You can avoid unnecessary empty elements and awkward overflow issues when clearing floats with a few short lines of CSS.
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.
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.
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.
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.