RSSAll Entries in the "CSS Hacks, Tips and Tricks" Category

Classification of elements in CSS

Classification of elements in CSS

A document is structured by it elements. The HTML elements that we commonly know are p, div, table, headings, span and many more. In CSS (2.1) each element has its own box that contains the element’s content. Hence these elements are broadly classified as: Replaced and Non-replaced elements Block-level and Inline elements This classification is [...]

Unitless Line Heights in CSS

Unitless Line Heights in CSS

One of my fellow designers asked me the other day, what are unitless line-heights and how do they work. And I remembered what Eric Meyer’s post on ‘Unitless line-heights’. I was new to designing then and used the old methods of specifying line height in pixels or percentages. Well that was until I came across [...]

Why does a CSS box model need a hack?

Why does a CSS box model need a hack?

The CSS 1 specification by W3C that was released in 1996 stated that the width and height of a block level element should determine the visible content area. Any padding, margins and borders that are applied to it at any time are then added to the box width and height. This meant that any padding, [...]