Most recent post

Cutting down on vendor prefixes

Most web developers currently use vendor prefixes in CSS to enable certain features in some browsers. That’s fine, but sometimes I see code examples and prefix-adding tools that go a bit overboard with the support and add every possible prefix that has ever been in use (and sometimes even ones that were never used). I think there are a bunch of CSS properties that we can safely stop using vendor prefixes for, or at least considerably cut down on the number of prefixes.

Posted on November 13, 2013 in CSS

Slightly older posts

Full-width justified vertically centered navbar

Two different ways of creating a full-width navigation bar with vertically centered links whose entire height is clickable.

Posted on October 13, 2013 in CSS, JavaScript

Responsive scrollable tables

A responsive technique for making data tables (or any other element) wider than their parent horizontally scrollable.

Posted on September 21, 2013 in CSS, JavaScript

Height in percent when parent has min-height and no height

Giving an element a height in percent may not do what you expect if its parent does not have an explicit height set.

Posted on June 28, 2013 in CSS

How to proportionally scale images that have dimension attributes

Images that have dimension attributes in the HTML will retain their height when scaled down with CSS unless you add a height:auto declaration.

Posted on June 13, 2013 in CSS

Firefox and the magical text-overflow:ellipsis z-index

If you start seeing mysterious dots rendered on top of positioned elements in Firefox, check your text-overflow and z-index properties.

Posted on May 31, 2013 in Browsers, CSS

Replacing images when printing

Sometimes you want to use different images when viewing a web page on screen and when printing it. One way of doing that is to use CSS generated content.

Posted on May 14, 2013 in CSS

Using a transparent image as an icon fallback

When you use an icon or other graphic instead of text for buttons, make sure there is real text for users who cannot see the image.

Posted on April 30, 2013 in Accessibility, Browsers, CSS

More posts are in the archive