Most recent post

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

In an ideal world there would always be a clean way of displaying data supplied by a third party on your site. Two examples would be getting the data in JSON or XML format from a Web Service and having an API to code against. But you don’t always have any of those options.

Sometimes the only way of incorporating data from a third party is by loading it in an iframe element. A few examples are financial reports, e-commerce applications, and ticket booking applications. Using an iframe is not ideal for many reasons, one of which is that it can make multiple sets of scrollbars appear on the page. Not only does it look ugly, it also makes the site less user-friendly. But there is a workaround.

Posted on December 16, 2011 in JavaScript, Usability

Slightly older posts

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

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

Styling buttons in iOS WebKit and -webkit-appearance:none

When applying CSS to buttons there are some odd behaviours in WebKit browsers for iOS. Luckily there are at least two ways of working around them.

Posted on November 24, 2011 in CSS

Screen readers and CSS

Some CSS intended for visual media types only has unexpected and semantic effects on screen readers.

Posted on November 17, 2011 in Accessibility, CSS

JavaScript-created markup also needs to be semantic and accessible

Browsers, assistive technology and end users have to deal with non-semantic markup even if it is inserted by JavaScript functions.

Posted on November 10, 2011 in (X)HTML, Accessibility, JavaScript

An accessible, keyboard friendly custom select menu

A way of styling the closed state of select elements without sacrificing accessibility.

Posted on November 3, 2011 in Accessibility, CSS, JavaScript

No more conditional comments in IE10

Microsoft is removing support for conditional comments in IE10. I don't think they will be missed.

Posted on October 27, 2011 in Browsers

More posts are in the archive