Chapter 12. Positioning Elements on a Web Page


When the World Wide Web Consortium introduced CSS-Positioning , some designers understandably thought they could make Web pages look just like print documents created in programs like PageMaker, InDesign, or Quark XPress. With just a couple of CSS properties, CSS-Positioning lets you position an element in a precise location on a pagesay 100 pixels from the top of the page and 200 pixels from the left edge. The pixel-accurate placement possible with CSS-P (as it was called way back when) seemed to promise that, at last, you could design a page simply by putting a photo here, a headline there, and so on.

Unfortunately, the level of control designers expected from CSS-P never materialized. There have always been differences in how various browsers display CSS positioned elements. But, even more fundamentally, the Web doesn't work like a printed brochure, magazine, or book. Web pages are much more fluid than printed pages. Once a magazine rolls off the press, readers can't change the page size or font size . About the only way they can change the look of the magazine is to spill coffee on it.

Web visitors , on the other hand, can tinker with your handcrafted presentation. They can increase their browsers' font size, potentially making text spill out of precisely placed and sized layout elements. But the news isn't all bad: As long as you don't try to dictate the exact width, height, and position of every design element, you'll find CSS's positioning properties powerful and helpful. You can use these properties to make a text caption appear on top of a photo, create multi-column page layouts, place a logo anywhere on the page, and much more.



CSS[c] The Missing Manual
Dreamweaver CS3: The Missing Manual
ISBN: 0596510438
EAN: 2147483647
Year: 2007
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net