Accessibility Page Navigation
Style sheets must be enabled to view this page as it was intended.
Intrafusion » Website Design & Development in Fife
Intrafusion » Website Design & Development in Fife

css

The difference between width:auto and width:100%

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.

The initial width of a block level element like div or p is auto. This makes it expand to occupy all available horizontal space within its containing block. If it has any horizontal padding or border, the widths of those do not add to the total width of the element.

Post tags:

Forgotten CSS selectors

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.

Post tags:

Nice and Free CSS Templates

This site contains free css templates for your website - Just copy and paste and there you have a stunning website!

Web link: http://www.mycelly.com/

Post tags:

50 New CSS Techniques For Your Next Web Design

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.

Syndicate content