Maintaining aspect ratio with CSS

Posted by on Sep 19, 2016 in Code Chat | No Comments
Maintaining aspect ratio with CSS

There are occasion when you don’t want the size of a box to flow with the page content. For example, when you’re building a page of tiled content, you may want to make sure all of the tiles are the same size, but you can’t fix the height and width because the size must be […]

Fixing blurry background images in Chrome

Posted by on Oct 17, 2015 in Code Chat | No Comments
Fixing blurry background images in Chrome

I recently came across an interesting issue whilst using background-image:cover to fill and crop an image to a specific size within a div. This works well and looks great in most browsers, but in Chrome, on certain types of images, if you look really carefully you can see a slight blurring of some of the […]

Secret tip: retrieve Twitter profile images without using the api

Posted by on Mar 22, 2014 in Twitter | No Comments
Secret tip: retrieve Twitter profile images without using the api

A common problem when creating sites which use the Twitter API is how to store and display user profile images. When you query the API the resulting user data gives you the URL of the user profile image. However this image URL is not a permalink. If the user changes their profile image the image […]

CSS specificity and point scoring

Posted by on Mar 1, 2014 in Code Chat | No Comments
CSS specificity and point scoring

We all know about how CSS works right? Styles are inherited and cascade through the DOM to child elements. We know that CSS rules referring to element IDs have a greater weight than classes and inline styles trump them again. But how exactly does the browser work out which styles should win out when multiple […]

WordPress Optimisation Checklist

Posted by on May 11, 2013 in Code Chat, WordPress | No Comments
WordPress Optimisation Checklist

WordPress is a framework which is great for rapid development because it is so quick and easy to set up. Check out the famous WordPress 5 minute install. However, if you want to really make sure that your installation is working as efficiently and securely as possible, there are a few extra tweaks I tend […]

Custom Styles for Select Inputs

Posted by on Mar 16, 2013 in Code Chat, JavaScript | No Comments
Custom Styles for Select Inputs

It’s long been a problem for developers that the Select (or dropdown) input doesn’t allow you many options for customising their look and feel. You shouldn’t be trying to style selects! When you search for help on this matter, you often come across people arguing that select inputs get their style from whatever browser you […]

Building a Responsive Design: Top Tips

Posted by on Nov 27, 2012 in HTML5, JavaScript, Responsive Design | No Comments
Building a Responsive Design: Top Tips

Coding HTML at the cutting edge, make use of HTML5 and CSS3 to create fully responsive layouts that look great on screens of all sizes.

Preventing Contact Form Spam

Posted by on Sep 9, 2012 in Code Chat | No Comments

This is a problem which comes up time and time again. Every time you add a contact form to a website, you open yourself up to spam attacks. Solving this problem involves striking the right balance between making life easy for the person filling in the form, and the person receiving the spam at the […]

Netbook review: Acer Aspire One

Posted by on Aug 20, 2012 in Review | No Comments
Netbook review: Acer Aspire One

I recently spent a year cycle touring abroad and one piece of kit seemed like a bit of a luxury before setting off, but proved to be incredibly useful and great value for money. The Acer Aspire One is a small, lightweight netbook with all the features I’d need in a laptop but at only […]

Target _blank is out the window

Posted by on Aug 15, 2012 in Code Chat, JavaScript | No Comments

Clients will often ask me to target external site links to open in a new window. Of course the correct answer is “No, it’s not up to a site to determine how a link should work, the user can decide that when browsing.” Not only is it bad practice but the target=”_blank” tag has been […]