Für’s nächste Redesign: Elastic Site Layout

Roger Johansson zeigt uns, wie ein Seitenlayout elastisch angelegt werden kann, dass die Seite in ein beliebig breites oder schmales Browserfenster passt. Beim nächsten Griff zum CSS!

To avoid that I used the max-width CSS property to specify how wide the #wrap element can become. I could have used pixels to define a maximum width for the layout, but that would have made line lengths increase as text size is reduced and decrease as text is made larger. I wanted line length to be comfortable for reading and stay roughly the same regardless of text size. By using em instead of px as the unit for max-width, the width will depend on font size and line length will be similar no matter what size the text is. — Fixed or fluid width? Elastic!