A major problem encoun­tered in a web design is one experi­enced when, although the page's width is not fixed, its minimum width happens to be greater than the visitor's browser's window's width. This causes the nuisance of horizontal scrolling.

But what is the minimum width one should be designing for?

You might initially see this completely open-ended: whatever width you manage to slim your page down to, there'll be someone with a narrower window to ruin the effect — until you get to zero, which is absurd.

However, note that the user is already discouraged from narrowing her window too much, as toolbars and window furniture become less usable. So narrower windows must be increasing rare, and you should worry less about catering for them. After all, if your website's purpose is to present something that is intrinsically wide, the narrow-window visitor must already have accepted some rendering nuisance.

But the normally very flexible text also has an intrinsic minimum width. The text has a longest word within it and, in the absence of hyphenation, the width of that word (plus margins, etc.) is the absolute limit. If the visitor is trying to view text containing that word in such a small area, then there's not a lot you can or should do about it. It's an extreme case without solution.

Nevertheless, you should do nothing to break your design until that point. A page of text might still contain several things that are instrincally wide, such as large images and tables, or program scripts, but it is important then to ensure that wide objects do not prevent the text's ability to fit the available space, as the ability to see those objects is usually much less important than to be able to read the text.

CSS3 proposes media queries. (Indeed, these are already partly standardized in CSS2 and HTML4.). The idea is that parts of a stylesheet may be applied conditionally on the type and characteristics of the rendering medium. The medium ‘type’ is the feature already standardized – the <link> element in an HTML document, that specifies a stylesheet, can also specify the suitable media (such as print, screen, aural, tactile). If the browser's medium isn't suitable, it doesn't apply the linked styles. The same sort of condition can be applied to a CSS fragment using an @media rule. CSS3 enriches the syntax of the condition, allowing it to be expressed in terms of the width or colour depth (etc.) of the medium. This then opens up the possibility of applying a width-hungry layout only when the width is available, and using a more narrow-friendly layout otherwise.

IE and Firefox support media queries based on media type. Opera and Safari go further, and support some expressions.