2 small random but useful tips for web developers

Did you know about protocol relative hyperlinks? Seems they’ve been around for a long time, and I’d certainly never seen them used before. Incredibly easy to make sure users never see any mixed content warnings. I seriously can’t believe I’d not heard of this sooner – is it news to anyone else?

Make a div into a link – this is something I’ve needed to do a few times, often when a designer has delivered a design that includes a top div as a logo area using an image as a background where it just feels natural to want to click the logo and end up at the home page. With some designs, it’s easy to convert the background image to simply be an img with a href inside the div, however often that’s a real pain and the desired result can only be achieved with background images. Enter this approach – the author mentions it’s not perfect, and has a few elements of hackyness about it, but it seems to be best approach out there.


Posted on Thursday, June 21, 2012 11:13 PM |

Like this? Share it!

No comments posted yet.

Post a comment
Please add 3 and 3 and type the answer here:
Remember me?
Ensure the word in this box says 'orange':