Chapter 8. Lay Out Pages
Insert div Elements
In the early days of the Web, the only way to create layouts for pages was to use tables. Unfortunately, this resulted in pages that contained much more code than they needed to convey their content, and that were hard to maintain and difficult for disabled users. It also created designs that were impossible to share across pages. Today, you can use CSS to create flexible, usable, and accessible layouts with much less code that are easier to maintain and very easy to reuse across pages.
In order to lay out your page, you need to ensure that each section of the page is enclosed in an element to which you can apply the CSS layout properties. The most commonly used element for this purpose is div
. The
Get Master Visually®: Dreamweaver® CS4 and Flash® CS4 Professional now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.