13.02.2013 Views

WEB STANDARDS CREATIVITY

WEB STANDARDS CREATIVITY

WEB STANDARDS CREATIVITY

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

162<br />

reasonable increments and prevents them from getting too long or too short for comfortable reading. Many typesetters revere<br />

an approximately 66-character line as ideal, and I am among them, so this example will use that width. This is a key proportion,<br />

and I want to make sure it is maintained as well as possible, which will be an important factor in how the page is put together.<br />

Okay, we admit it: This book breaks the line-length convention outlined here on many an occasion, but we<br />

have our reasons. It is mainly due to the fact that we are dealing with not only text, but code sections as well;<br />

code lines become a lot less readable if you have to break them up into several fragments to fit them on<br />

the page.<br />

If I use a liquid layout, the line length will increase or decrease based on the width of the user’s browser window (Figure 7-4).<br />

On the other hand, if I use a fixed-width layout, the line length will increase or decrease if the user resizes the browser text, and<br />

the potential also exists for horizontal scrolling if the browser window is skinnier than my page’s specified width (Figure 7-5).<br />

Dissatisfied with both of these options, I’ve chosen instead to use an elastic layout, which gives me the best of both worlds<br />

(Figure 7-6).<br />

The layout will expand and contract as the text is resized or as the browser is resized, but it will not expand beyond a specified<br />

width. The compromise here is that my line will get shorter as the browser window contracts, but a too-short line is<br />

easier to read than one that is too long, and is also a pleasant alternative to horizontal scrolling.<br />

Figure 7-4. Liquid layout: When the browser window is expanded, many find the line too long for comfortable reading.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!