Getting Started with TablesTables were originally used simply to present data, much as they are in a word processor. Tables are still used quite often on web pages for organizing informationstatistics or price lists, for example. But in web design, tables pull double duty. In web design, tables pull double duty: they are used both to hold data and to control page layout. Rather than using tables just to hold data, early web designers realized that they could use tablesor more specifically, the grid of rows and columns that make up a table's structureto hold graphics, paragraphs, headings, and so on. Though more sophisticated page layout methodssuch as CSS layersare now available for controlling web pages, tables remain a mainstay of web designplus they're easy for budding web designers to use. Here's a table in its more traditional role: displaying data. Noteworthy
But whether you're using tables to present data or to control your page layout, a lot of the table commands and features in Dreamweaver are the same. If you know the commands for tables that hold data, you'll also have 'em down for tables that control layout. You'll start here by inserting a basic table to hold data on your web page. This will get your feet wet for what comes next: using tables to structure your page layout. Inserting a Basic TableSo you're ready to start setting up a basic table, right? Before you begin, you should have a fairly good idea of the number of rows and columns you think you'll need. If you're going to be building a complex table, you may want to figure out your table on paper first, before you begin building it in Dreamweaver. That way, you'll know how many rows and columns to create. If you're building a table that will be used to control page layout, think about how many main areas you want on your page. For example, you may want a header across the top, a nav bar on the left, and a main area taking up the rest of the screenwhich means you'll need a table that contains two rows and two columns. Whether you're using a table to help lay out your page or simply to hold text-based data, the process for inserting a table on your page is the same. Getting your table to look and do what you want is another matter, but we'll discuss that in a bit. If you're building a table that will be used to control page layout, think about how many main areas you want on your page. Here's how to insert a table on your page:
Dreamweaver inserts the table on your page as a grid of rows and columns. You'll notice that the width of each column is scaled proportionally to maintain the overall width of your table. Later in this chapter, in "Setting Row, Column, and Cell Properties," you'll see how to precisely control the column widths to make individual columns wider or narrower in your table. |