Archived posts, December 2011

The difference between width:auto and width:100%

If you’re using width:100% to undo a previously set width on a block level element, you should probably be using width:auto instead. Here’s why.

Posted on December 2, 2011 in CSS, Quick Tips

Visited links can only be differentiated by colour

It used to be possible to apply any CSS to visited links. This has privacy issues, so most browsers have implemented styling restrictions and only allow colours to be changed.

Posted on December 8, 2011 in Browsers, CSS

How to adjust an iframe element’s height to fit its content

In some cases JavaScript can be used to resize an iframe element to make it as tall as its content, making it look like the content is part of the parent page.

Posted on December 16, 2011 in JavaScript, Usability