CSS

The difference between width:auto and width:100%

Posted onSunday, 18 December 2011

Tagged withSyndicateCSS

When adapting a layout for different viewport widths (a.k.a. responsive design) or media (like print), it’s common to reset any float and width values on major layout blocks to linearise their display.

Unfloating a floated element is as simple as specifying float:none. Width doesn’t seem to be quite as straightforward – lately I’ve come across several cases where people use width:100% to undo explicitly specified widths when they should be using width:auto instead. So here’s a brief explanation of the difference.

Read more »

Forgotten CSS selectors

Posted onTuesday, 09 February 2010

Tagged withSyndicateCSS

Anyone who has been using CSS for any length of time has probably been frustrated by the lack of selector support in Internet Explorer 6. There are quite a lot of cases where a CSS 2.1 selector will let you target elements in all other relevant browsers, but where you, if you want it to work in IE 6, have to add a class or id attribute to the HTML.

Here are brief explanations of some of the most useful “forgotten” CSS 2.1 selectors.

Read more »

50 New CSS Techniques For Your Next Web Design

Posted onMonday, 20 July 2009

Tagged withSyndicateCSS

CSS is almost certainly one of the best developments in web design since the first graphical web browsers were adopted on a wide scale. Where tables created clunky, slow-loading pages, CSS created much more streamlined and usable web pages. Plus, CSS has allowed designers to achieve a number of different styles that used to only be possible with images.

Read more »

Subscribe to RSS - CSS