This is the fourth part of a multi-part project related to the fictional Oregon Film Festival site.
The owner of the Oregon Film Festival wants you to make the actual home page of their new website. This involves a four or five part process that is explained below in an overview (example) and then in the actual steps.
Here is what the finished Home page should look like:
This assignment is an overview of the proper process to designing and developing a typical website. The step-by-step instructions described in this assignment are the steps you will want to follow when designing most standard websites.
This is an overview of the proper process to designing and developing a typical website. The instructions to complete OYO 4 are below this overview, but take a look at the steps described in this overview. They are the steps you'll want to follow when designing most standard websites.
Either on paper, a dry erase board, in a document creation program like Microsoft Word or Microsoft PowerPoint, in a wireframing program like Microsoft Visio, or in a graphic design program like Adobe Photoshop or Adobe Illustrator, plan your website's typical page (usually the home page of your site). Be sure to mark off the rectangular quandrants or zones that the page can be divided into and give those zones names. Those zones will be the divs and their names will be their IDs. This layout is commonly referred to as a wireframe.
Linked is an example of a well-designed wireframe and another wireframe layout that includes pixel measurements for the divs.
Here is a sample of dummy text also known as lorem ipsum text if you need filler text for your wireframe.
Here's a really raw drawing of a wireframe concept, but hey, this works, too!
Create the structure of your home (or first) page. This means insert the div tags on your home page. Just like they are your children, give all your divs unique names (using the ID attribute in the HTML). For example, if the upper left most div will be the container for your logo, then give it id="logo" as an HTML attribute.
You may want to give your divs some minimal styling at this point, such as giving them height, width, z-index, and a type of positioning (relative, absolute, or fixed). To do this part, create ID selectors in the CSS that correspond to their ID attributes in the HTML.
With Dreamweaver, it's easiest and more efficient to add the divs by hand-coding them in Code view.
Here's an example of a structure that goes with that raw wireframe drawing above:
Add text or pictures into the divs as appropriate. Also, add a navigational bar (menu buttons) using an unordered list. Give the navbar ul an ID attribute in the HTML. Call it something like "navlist".
With Dreamweaver, adding text is easiest to do in Design view, and you can copy and paste text from other Web pages and documents into Design view and Dreamweaver automatically creates the underlying code. Images are usually easier to paste into the divs in Code view since you can't see them in Design view if they are unstyled.
It's best to start with tag selectors to provide the bulk of your styling. Then add ID selectors for the divs in the order that they appear in the HTML. Also, be sure to style the navbar as completely as possible including its descendant tags. Finally, create and apply class selectors if you need to make any exceptions to the style you created with the tag selectors. Give your class selectors names to describe their function and also names that you'll remember when you have to find them later.
With Dreamweaver, it's faster and more efficient to use the CSS Styles panel to create your selectors. Unless you have a really good memory for property names, it's best to find them in the CSS Rule Definition dialogue box in Dreamweaver.
At this point, you'll also want to externalize your CSS (put it in a separate and linked .css file).
Once you have a well structured and well styled home page, you can make copies of it for your other pages, then change the content on the new pages.
This is typically done on a page-by-page basis. In other words, just add scripts (JavaScript), Spry (or other AJAX) on pages that need them. You may also want to create and test the server-side scripting files at this point especially if they provide password protection or a site search feature to your home page.
With Dreamweaver, you can use the Behaviors button (under the Tag Inspector panel) to access the JavaScript that's built-into Dreamweaver. The Spry (which is Adobe's version of AJAX) can be accessed under the Insert menu or panel.
After you finish scripting as needed, then all you'll have to do is update the navbar links to all pages. Voila!
Now that you've read the overview, you can begin work on the Oregon Film Festival site and follow the steps as described in the overview.
For the Oregon Film Festival site, we'll start by planning a regular Web page.You have a simple page with content and basic style (created in OYO 3), and now you'll do the actual work of creating a working home page for your site complete with structure, content, and style.
Here's the wireframe (made in PowerPoint) of the Oregon Film Festival home page you'll create:
Note that the box "logo image goes here" will not be a div, but the actual image itself. All the other boxes, including the container box that goes around everything else, will be div tags.
So, in total, you'll have 7 divs for your structure. In these instructions, they'll be referred to by the name you see above or by their shortcut name: div#centerwrap, div#header, div#social, div#navcontainer, div#leftcol, div#rightcol, and div#footer.
Now that you see what you're goal is (in the wireframe above), you'll be able to create the structure following the steps below.
Instructor Note:
index.html is the traditional filename for a site home page. It's a special filename that causes the browser to automatically load that page when you go to the site root folder (the URL) in the address bar of the browser. In other words, when you type in a URL, it automatically loads the index.html page that is sitting in the site root folder.
Other names have been used in the past, such as home.html and default.html (or default.asp). You can use the name index with other extensions (such as .shtml and .php). The server software (most commonly Apache or Windows IIS) does allow you to configure whatever name you want, but by default, the name index.html has priority. It's best to stick with index.html as your home page name.
Instructor Note:
There are other ways to insert divs using Dreamweaver, but these are for people who don't understand how structure works. These other methods are more time-consuming and potentially confusing if you know what you're doing. By now, you've already been exposed to structure and div tags, so you should, from this point on, only type them directly in the code.
Instructor Note:
The ID (id attribute) is always followed by the equal sign and the value, in this case the name of the div. Remember, id attribute values (the name of the div) can only be used once on a page. In other words, if you have a div ID'ed as "centerwrap", you can't have another div with that same ID.
This should make sense. Think of divs as your babies and each should have a unique name to identify it when you style it later. Ok, maybe you don't want to think of them as your babies, but the rule that they are unique still applies...
Prior to starting this part, be sure to download all the remaining assets for the Oregon Film Festival site. To do this, go to the link Course Files on the course main navigation bar, then into the oregonff/assets folder. Right click on each image and Save Link... or Save Target As... (depending on what your browser calls it).
Instructor Note:
Just to be clear, you can't drag and drop files from a Web server to your own computer or USB thumb drive. You must right click on them and save the files. If you attempt to drag and drop them, all you'll get is a shortcut link to the image. It might appear to work, but it didn't really work...
Follow these steps to add content to your page. We'll start by adding text content, then add the image content afterward.
Instructor Note:
When you press enter (return) in Design view, it creates a p tag with a non-breaking space <p> </p> in the code. If you press enter (return) in Code view, it only creates an extra line. Be sure to switch to Design view to create those extra paragraphs quickly -- either that or you have to type them in the code, which isn't a terrible thing, it just takes more time.
Instructor Note:
You'll notice another closing </div> after div#footer closes. Remember, that's the close to the container div#centerwrap. Don't let it confuse you and definitely don't delete it!
Instructor Note:
An iframe, or inline frame, is basically a hole or portal window in your Web page. Through it you can view other Web pages, including ones on your local site or any other external site. Iframes are one of the only frame elements still widely in use on Web pages and there are still many good uses for them, as you can see with this YouTube video.
Instructor Note:
This is a common strategy to give links an a tag even though you don't have an actual page to send them, too. One major reason to do this is that you may need to style the a tag later to make it look like a button -- you can't do this with the li tag alone. A null link (or nothing link) is a pound sign, which basically means to the browser "stay on this page when clicked". It also doesn't cause the Web page to reload in the browser, so it won't be confusing to the user when it does nothing when clicked. It looks like a link, it feels like a link, but it just does nothing!
Instructor Note:
It's a very good idea to use page names instead of null links when you can. In other words, as part of the planning process, when you create the sitemap, would be to give all the pages file names at that point. If you can give them links on the navbar early on, then, when you make copies of the first page for all the other pages, then the links are correct already. If you don't do this, and just have null links, then later you'll have to update the links on ALL page of your site one at a time.
Of course, null links are better than no links at all, so if you haven't planned out your page names, go with null links instead.
Instructor Note:
It's actually not necessary (or even desirable) to create your CSS beginning with Page Properties... in the Properties panel as we did in OYO 3. We did that because that lesson occurs before you learned more about CSS. It tends to create additional and unnecessary tag selectors (like the h1, h2, h3, h4, h5, h6 one and you'll probably never even use an h5 or h6 in your Web design).
Now that you have a greater comfort level using the CSS Styles panel, you should start with that. To create new style in that panel, you click the + document sign.
This figure below shows you the buttons at the bottom of the CSS Styles panel and describes their functions.
Instructor Note:
More students lose all their style at this point because they don't realize that, from this point forward, they are working with two documents, the Web page and a linked CSS file. Save All from the File menu item will save any unsaved documents that are currently open. Do this, and get in the habit of doing it often.
Instructor Note:
This is a big WARNING! -- when you use Undo, you are undo-ing whatever you last did in the Design or Code view window that's currently open. In other words, if you want to undo something you just did in the CSS Styles panel, you'll have to switch to Code view, and click on the .css file just under the Web page file name tab, THEN click undo. If you're not careful here, you'll undo the last thing you did in the HTML instead of the CSS.
This can be confusing, but just remember -- YOU'RE WORKING WITH TWO DOCUMENTS NOW!
Yes, I am shouting at you.
Instructor Note:
The asterisk (*) is known as a wildcard and is used to indicate ALL tag selectors. In other words, you are using the asterisk to indicate you want the properties that go with it to be applied to ALL tags in the HTML. In this case, you're going to indicate that a 0 margin (no margin in other words) will be applied to all tags in the HTML. This will have an immediate effect. All the double spacing that you see with p tags and h1, h2, etc. tags is caused by margin. Setting them to a margin of 0 will remove the double spacing effect!
When you see margin: 0; listed like that, it means the margin for all sides, so leave "Same for all" checked above the Margin in the Box category window.
Instructor Note:
Setting the container div, #centerwrap, with an A) width in pixels, B) margin-left of auto, and C) margin-right of auto causes it to center in the browser window -- specifically the auto left and right margins cause a tug-of-war situation for the container within the browser window effectively canceling each other out and leaving the div sitting in the exact center of the window. Much like the majority of sites on the Web, this is a very typical fixed-width layout. Bear in mind, that when you create your own fixed width sites, you'll very likely use a width in pixels and left and right auto margins.
Instructor Note:
The float: left; property causes a div that has a width to be knocked out of text alignment with the other elements (tags and content) on the page. The purpose of doing this is to create columns. There is no better and more commonly used method of creating columns in Web design. The downside is that knocking a div out of text alignment causes the divs below it to rise up and possibly under the div you knocked out of alignment. Notice how the content in div#footer appears to have risen up and directly (and awkwardly!) below div#rightcol.
Instructor Note:
Left and right padding add to the width of a div (as odd as that is!). So, if your div has a width, like div#rightcol does (580px on the wireframe), then subtract the amount of padding-left (10px) from the width, leaving you with a width of 570px.
Instructor Note:
Using the clear: both; property cancels the float affect on div#footer. This makes it so div#footer will not awkwardly rise up and under the floating divs. You will ALWAYS have to give the div just below the divs that are floating the clear: both; property so it doesn't behave strangely and stays put beneath the floating divs.
Instructor Note:
Compound selectors are actually referred to as descendant selectors in the real world (you know, outside of the Dreamweaver program). A better name for them would be "nested selectors" because they are really a group of selectors, separated by spaces, with the selector on the right nested inside the ones on the left. In the case of this descendant, #navcontainer ul li (and there must be a space between each of these three selectors), the properties you create will only affect the li tags within the ul tags within div#navcontainer. Notice that, after you Ok this one, that only the bulleted list in div#navcontainer is affected. The bulleted list in div#leftcol is not. By using descendant (compound) selectors, you can style only the very specific tags that reside in a specific div. Powerful!
Instructor Note:
Although a:link is really a type of tag selector, it must be entered in as a compound. Actually, any tag that's followed by a colon (:) with NO SPACES like a:link or a:visited is properly referred to as a pseudo-class selector. It's not really a tag selector because it's only one state of the a tag, and it's not really a class or any other selector, so they call it "pseudo" or "false" class selector. Come to think of it, I'm sure there is a better name if they would have thought about it for a while...
Instructor Note:
This is an important quirk in Web design, and it's important to bring it up now. When you use a:link, a:visited, a:hover, and a:active (though this last one is rarely used), these selectors MUST stay in this order, top to bottom, in the CSS code. In other words, a:link must be placed first before a:visited and a:visited must precede a:hover. If you don't leave them in this order, they will likely not style the a tags correctly. To remember this order, you can think of the first letters of these pseudo-class selectors (LVHA). These letters appear in this order in the words LoVe-HAte. So, a tag pseudo-class is really a LoVe-HAte relationship. Ha ha...?
#navcontainer ul
{
text-align: center;
padding-bottom: 5px;
padding-top: 5px;
padding-left: 0;
margin-top: 0;
/* cancels gap caused by top padding in Opera 7.54 */
margin-left: 0;
background-color: #295A33;
color: #FF0;
width: 100%;
font-family: Arial,Helvetica,sans-serif;
line-height: 1em;
/* fixes Firefox 0.9.3 */
}
#navcontainer ul li
{
padding-left: 0;
padding-right: 0;
padding-bottom: 5px;
/* matches link padding except for left and right */
padding-top: 5px;
font-size: .8em;
}
#navcontainer ul li a
{
padding-left: 10px;
padding-right: 10px;
padding-bottom: 5px;
padding-top: 5px;
color: #FF0;
text-decoration: none;
border-right: 1px solid #fff;
}
#navcontainer ul li a:hover
{
background-color: #369;
color: white;
}
#navcontainer #active
{
border-left: 1px solid #fff;
}
Instructor Note:
This additional code for the navigational bar originally came from the Listamatic website (and I modified the colors). This is a community CSS site where designers share their CSS code for styling interesting navigational bars. The code is free for you to use, copy and modify (as is all CSS code because it's open source). Check out some of the unique navbars and see if you can make use of them in your own designs!
Instructor Note:
I personally like tag selectors to be listed first, since they are the general style rules of the page. I then always put ID selectors next (in the order you'd find them in the HTML), followed by the compounds that go with each ID'ed div. Then I end with class selectors since they are exceptions to the general rules I created (the tag selectors) and are usually fairly rare in the CSS.
Also, be very careful to keep the a:link, a:visited, a: hover, and a:active ones IN THAT ORDER as described in #9 of the Instructor Note just below the selectors table above.
Upload both files to the SWS using the Site Definition we created in class. Always remember to avoid, file management chaos.
Mail your instructor using D2L email with a subject like CAS 111d OYO4 Uploaded Your Name (where Your Name is your actual name)
Instructor Note:
Be sure to use a browser (or more than one browser) to check your Web pages (or document) is on the SWS.