Nick Roper wrote:
For example, suppose I have a maincontent div in which other content blocks will be positioned. Is it acceptable to set padding on the main div, or margins on contained divs, in absolute units - say 30px - on the basis that this shouldn't affect the content itself (or could it?)

Firstly, pixels are not absolute units, they are defined as relative units. Although this is a very common misconception, try not to get confused about the terminology.

Relative units are defined as such because their size is relative to something else. The units em and en are relative to the font size, percentages (for width, height, margin, padding and border) are relative to the container size and pixels in CSS, as opposed to device pixels, are relative to the nominal viewing distance of the device.

Absolute units are a fixed size and are not relative to anything. They include millimetres, centimetres and inches. I believe the misconception occurs because (unlike em, en and %) px are not relative to something that the user can easily change like their window size or font size.

Secondly, yes it is ok to set sizes in pixels. However, you must be careful not to use pixels in a way that restricts the user's ability to make the design comfortable for themselves. For instance, if the use of pixels affects a user's ability to increase the font size or, in extreme cases, use a narrower viewport than your own because doing so can significantly break the design or makes it difficult to read, then you should consider a different technique.

--
Lachlan Hunt
http://lachy.id.au/


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to