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.
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.
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:

The page you are going to create looks like this:

HTML with Layout: set to <none>,
Doc Type: set to HTML5, and click
the Create button.If you cannot see the toolbar on the document window, then go to View --> Toolbars --> Documents. This will show the toolbar.
houses subfolder, as house_info.shtml (use the .shtml
extension so that we can later use SSI to include a navbar).Hogwarts Houses, and in the Property Inspector (at the bottom)
choose Format | Headings1. Notice how the HTML code in the Code View window changes accordingly.
While you can use the Property Inspector to change the font or color of this header, you are going to instead
create a new CSS rule for that purpose. Go to: Format --> CSS Style
--> New... and change the options as shown in the following image (note: newer versions may have some of the
options available through a pull-down menu):

h1 tag. For the moment, just change its
font-family, font-size and color in the Type tab, and change text align to center
in the Block tab.
After submitting these changes, you will see the new styled header in the Design view, as well as
the CSS code in the HTML code view. Another place where the new CSS rule shows up is in the Panel
group, on the right of your document. At this point, it should look similar to the image below:

This tab is useful when you want to add new properties to an existing rule or change previous values. Tip: Clicking on a name tag in the code view will show the style properties in the CSS panel group.
In order to create one of the boxes that contains short information about a house in the index
page, we will insert a div in the Design view, using the Insert Panel.
Name the div "houseinfo" and click on the button "Add CSS Style".
You will be presented again with the "New CSS Rule" window we saw before, and you just need to
click on OK. The familiar window, "CSS Rule definition for .houseinfo" will show up, and you can
use it to define style and positioning for your div. Use these values to style the
div:
font-family: Geneva, Arial, Helvetica, sans-serif
font-size: 12pt
color: #3300CC
margin: 10px
padding: 10px
float: left
height: 300px
width: 300px
border: thin solid #3300CC
Going back to the Design view after submitting the following style rules, you will notice a placeholder that should look like this:

br
tags after the lines (respecting the original text). If you don't like them (and sometimes
you will not need them), make sure to change the code.
thumbnails subfolder.
You will be asked to enter a value for the alt tag.
img tag. Use Dreamweaver
to choose a nested selector for your rule: .houseinfo img. Click OK, and then make
the image float left and have some margin to the right and at the bottom.
div, you can actually copy the box
(or the code) and paste it 3 times. Then, change the text and the image for each of the boxes.
To change the image, you can use the Property Inspector (changing the source and the alt values).
Since the style is already there, your work on the page is done.
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.
Insert a new div above the "houseinfo" divs in the Design window. Name it "mainpage", and when you select the new CSS style, specify a width of 700px. Why that wide?
You need enough space for two of the "houseinfo" divs, plus any padding and margins that are required. Each "houseinfo" div has 10px margins and 10px paddings on the left and right, plus 300px of content = 340px each, or at least 680px total for two. 700px gives you a little extra room.
The original Hogwarts page you looked at earlier also had a sidebar containing a menu.
Hogwarts Houses
Gryffindor House
Hufflepuff House
Ravenclaw House
Slythering House
Mugglenet Website
http://www.mugglenet.com. Later, when you have created the individual
pages for the houses, you can make the other items in the list links to those pages using the same method.
You'd like this menubar to appear in a sidebar to the left of the "mainpage" div. To do so:
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:
CSS, and click
the Create button. Notice that you now have two files open in Dreamweaver, and that you
can switch between them with the tabs at the top of the Dreamweaver window.
<style> tags from the code).
houses.css (make sure it is in the same folder as the HTML file).
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.
gryffindor.shtml, hufflepuff.shtml,
ravenclaw.shtml and slytherin.shtml. Save these files in the
html subfolder. Before saving each file, change the title of the page and the
header to something like "Gryffindor House", etc.
houses_info.shtml and add hyperlinks
to the first four navigation menu items (similar to what you did earlier for the Mugglenet link,
except that you will browse for the files you're linking to, and use relative URLs, rather than
an absolute URL).
houses.css:
/* get rid of bullet and stuff that adds to width. */
.sidebar ul {
margin: 0;
padding: 0;
list-style-type: none;
}
.sidebar a {
display: block;
padding: 0 20px 0 20px;
}
.sidebar a:hover {
background-color: silver;
}
.sidebar a:visited{
text-decoration: none;
}
house_info.shtml
page after we created the new pages). Should
we go and copy and paste the new version of the menu to every file?