Create a Website using Dreamweaver

Dreamweaver is an application that can be used as a web editor. Dreamweaver generates both HTML and CSS code. It can be a useful tool for creating web pages, once you have a solid foundation in HTML and CSS, and after you learn the details of using the application.

In this exercise, you'll use Dreamweaver to create and format a website about Hogwarts Houses.

Looking at the end product

Look at a beautiful example of a page about Hogwarts: Hogwarts Houses, by Eni Mustafaraj, a faculty member of our department. Dreamweaver can be used to create an elegant page like this!

Also view a simpler version, much more like the one we worked on in a previous lab. This exercise takes you through the steps to produce a page like this, the one with the 2x2 layout, using Dreamweaver.

Setting up your file structure

Begin by saving this text file on your Desktop, as it contains the text you will for your web pages. Notice that this is a plain text document, as opposed to an html document.

To save lab time, download a starting set of organized folders. Use Fetch to navigate to the /home/cs110/public_html/lectures/dreamweaver folder, and drag the hogwarts_initial folder to your desktop. Examine the folder and contents to make sure that it is organized as follows:


Structure of the initial Hogwarts Houses website

Create your first page with Dreamweaver

The instructions on this page are not very detailed, and they aren't intended to substitute for the official Dreamweaver documentation. Instead, they are used as reminders of how things are done. For exact step-by-step instructions, please use the online Dreamweaver documentation, which is user-friendly and absolutely great!

The page you are going to create looks like this:


Screenshot of finalized web page

Save your file and view it in a browser by selecting File --> Preview in Browser , and selecting a browser. Your four house divs should appear in a 2x2 grid. Try resizing the browser window and making it smaller. What happens to the layout of your divs?

One way to ensure that the layout is maintained is to encase the four "houseinfo" divs in another div that is wide enough to hold two "houseinfo" divs. The layout will then be maintained even if the browser size changes.

Adding a navigational menu

The original Hogwarts page you looked at earlier also had a sidebar containing a menu.

You'd like this menubar to appear in a sidebar to the left of the "mainpage" div. To do so:

External style sheet

Until now, you have used document-level CSS for your page. Of course, an external style sheet is preferable (especially since we know in this case that we are making a multi-page site). The easiest thing to do at this point is to copy your document-level CSS into an external style sheet, and then attach the style sheet to the HTML file. To create a new style sheet:

Creating other pages and styling the navigation bar

Until now we have created only one page for the website and need four others. The good news is that we can use the existing page as a template for the other files and just change the main content in the other files.