Create the CSS layout and the CSS menu

Open the home page, if not already opened, and start working on the CSS layout first.  Then you will add the menu in the location designed for it.

Designing a CSS layout means working with divs, and not with tables.  Since the layout you will create is a very simple one, you will describe its properties inline, and not in a separate .css file.

You want your site content to be displayed in browser horizontally centered, and having a width of 800 pixels.  You want the menu to be displayed on the left, fitting in a 200-pixel width, and the page content to be displayed on the right, but not to be expanded under the menu as well.  For this you need three in your page:

  1. The wrapper div that includes the other two: 800-pixel width, auto margin (to be horizontally centered).

  2. The menu div: 200-pixel width, floating on the left.

  3. The content div: floating on the left as well (so that no matter how large the content is, it will always be aligned to the left).

Back to the home page, switch to Code view and enter the following code between the <body> opening and closing tags:

<div style="width: 800px; margin: auto;">
<div style="width: 200px; float: left;">Menu placeholder</div>
<div style="float: left;">Content placeholder</div>
</div>

 

Switching back to Design view, this is how the home page should look like:

 

After creating the simple CSS layout, it is now time to generate the database-driven menu.  Click inside the menu placeholder, and remove the temporary text ("Menu placeholder").  Keep the cursor inside that div and apply the Database-driven CSS Menu Wizard from the InterAKT tab of the Insert bar.  The wizard has four steps.

  1. Configure the first step of the wizard as shown below:


                 

  2. Configure the second step of the wizard as shown below:


                

  3. Configure the third step of the wizard as shown below:


                

  4. Configure the forth step of the wizard as shown below:


                

After following all these steps, the home page in Dreamweaver, in Design view, should look like this:

 

Notice the elements added in the Server Behaviors tab of the Application panel (recordset and server behavior).  If you want to edit any of these, double-click their name in the list.

Save the home page and upload it to the server.  You can preview it in browser (press F12) if you want to, but the pages to which menu items point are not created yet (except for this one).

 

Considering this current state of the home page, it is time to create (in the site root) the other three site pages before adding specific content in the content placeholder.  Right-click the filename displayed in the top bar of the file area, and select the Save As option:

 

Save three new files in this manner by the following names:

Continue with the next topic to add, for all the four site pages, specific content inside the specially designed placeholder.