Before you Begin Project 2:
- If you are a beginner make sure you go through steps 1- 10 of the Dreamweaver CS3 Tutorial before attempting this project.
- Download the project files. (DWCS3_CSS Template.rar (276 KB)-- If you are unable to download this means you need to follow me first and after that you have to send me a request mail after that i will approve you.)( Template Preview )
- Make a copy of the ‘images’ folder in a folder entitled “DWCS3_CSS Template”.
Define site, create template and external css file:
- Define a site “DWCS3_CSS Template” specifying the new folder you made as the root directory.
- File > New
- In the window that opens: Select Blank template > HTML Template > None
- Save the template. Name it template_css. It will get saved as a .dwt file in a new ‘Templates’ folder.
- In the CSS Panel > click the ‘New css Rule’ icon
- Selector type = tag, Tag = body, define in = New style sheet file, file name = styles, click “save” button.
- In the CSS rule definition window:
- Select “Box”, For margin and padding enter “0”
- Select “Block”, For Text Align enter = center
- Click the styles.css tab at the top of the document window and save the styles.css file
- Click the ‘template_css.dwt’ tab at the top of the document window to get back into the template file. You will have to save the stylesheet and template files everytime you make a change (when the * symbol appears)
The header:
- Insert > Layout Object > Div Tag
- In the “Insert Div Tag” window that opens:
- ID = header
- Click “New css style”
- In the “New CSS Rule” window that opens Selector = #header will already be inserted and define in = styles.css will already be selected. Click the Ok button.
- In the “CSS rule definition” window that opens
- Click “Box”. Click “Box”. Enter Width = 780 pixels.
- Padding = 0, Margin = Auto.
- Click ok button. Click ok button.
- You will see ‘Content for id "header" Goes Here’ in a dotted box appearing in the document window. This is the header div. You can check how it will look in the browser by clicking File > preview in Browser > select browser name. You should do this regularly throughout the process of building the layout so that you know as soon as something is not looking ok. You should also check in both IE and Firefox to ensure it is working fine in both the browsers.
- In the css panel you will see 2 styles – body and #header.
- Let’s specify the default font in the body tag. Right click “body” in the css panel. Select the “Edit” option. The css rule definition window will open.
- Select “Type”.
- Specify Font = ‘Arial, Helvetica, sans-serif’.
- Size = 12 pixels
- Click “OK”.
Logo and Search Div:
- Delete ‘Content for id "header" Goes Here’, keep your cursor inside the div.
- Insert > Layout objects > div tag.
- ID = logo
- Click “New style sheet” button, selector=#logo, click ok.
- Block > Text Align = left
- Box > Width = 50%
- Box > Float = Left
- Box > Padding/ Margin = 0
- Click OK . Click Ok.
- “Content for id "logo" Goes Here” will appear in the document window. And a new style #logo will appear in the css panel.
- Go into the code view (click the “Code” button at the top of the document window or select View > Code)
- Place your cursor after the div id="logo" closing tag i.e. After “Content for id "logo" Goes Here”
- Go back to design view (click the “Design” button or View > Design)
- Insert > Layout objects > div tag.
- ID = search
- Click “New style sheet” button, selector= #search, click ok.
- Block > Text Align = right
- Box > Width = 50%
- Box > Float = right
- Box > Padding/ Margin = 0
- Click OK . Click Ok.
- Delete “Content for id "logo" Goes Here” and insert the logo image. Insert > Image > browse and select logo.gif from the images folder.
- Delete “Content for id "search" Goes Here” and insert the search code here. For now you can simple enter a form tag, a text field and a button. Please note that the search will not actually work until it is programmed to do so. You can use one of the free search options.
- Insert > Form> Form
- Click inside the red dashed outline that appears
- Insert Form > Text Field
- Insert Form > Button
- Click on the button that appears and rename it in the Properties panel. Value = Search.
Menu Bar Div:
- Go into the code view. Click the after the closing header div tag. To do so you can click anywhere within the header div tag (eg. select the logo image in the design view before going into the code view) and then click the that appears at the bottom of the code view window. The entire header div code will be highlighted. Then you can easily click after the closing tag.
- Now let's add the yellow menu bar.
- Insert > layout objects > div tag. Name the div ID= menu.
- Create the #menu css style with the following properties:
- Box > Width = 780 pixels, Clear = both, Padding = 5 pixels, Margin = Top = 0, Left = auto, Right = auto, Bottom = 1
- Background > Background color > Click the triangle on the gray box to get the color palette and the ink dropper. Move the cursor to the flower in the logo and pick the yellow color.
- Block > Text align = left
- Click Ok
- Delete the default text that appears in the menu and type in the menu text “Home | Services | About Us | Contact Us”
Content Div:
- Similarly create another div and css style entitled “content” below this div
- Insert > layout objects > div tag. Name the div ID= menu.
- Create the #content css style with the following properties:
- Box > Width = 780 pixels, Height = 300 pixels, Clear = both, Padding = 5 pixels, Margin > Top = 0, Left = auto, Right = auto, Bottom = 0
- Block > Text align = left
- Border > top/ bottom> solid> 1 pixel > pick green color from the leaf in the logo.
Footer Div:
- Similarly create a “footer” div tag and css style with:
- Type > Size= 10 pixels
- Click OK
- Replace the default text that appears with “Copyright 2011 | Abhinav Pathak"
H1 and Menu Link Styles:
- Click the “New css rule” icon in the css panel. Redefine the H1 tag. Select ‘Tag’, Type Tag = H1, give the font size = 20 pixels and pick the green color from the leaf for the font color.
- Similarly let’s create a style for the menu links. Create a new css style called “#menu a”.
Type >
- Font color = black (pick from the color picker)
- Decoration = none
- Weight = bold
Editable Region:
- Delete ‘Content for id "content" Goes Here’ and Insert > Template objects > editable Region (See Step 7 in Dreamweaver Tutorial CS3). Name the editable region “content”
- Your template is almost ready. We will use it to make the pages and then come back to link the menu items.
Create the web pages:
- File > New > Page from Template > DWCS3_CSS Template > template_css> click create > Save as “index.html”
- Change the title of the page to “Welcome”.
- Insert the image of the mother and child. Type the heading text and the remaining content. Right align the picture. Apply the Heading 1 tag (format dropdown in Properties panel) to the heading.
- Make 3 copies of the index.html file in the ‘Files’ Panel. Change the page title, heading and content to reflect ‘services’, ‘about us’ and ‘contact us’. Save them with similar names.
Link the menu items:
- Go into the template file and link the menu items (See Step 9 in Dreamweaver tutorial CS3) to the appropriate pages.
- Check your pages in the browser to make sure everything looks ok and that the links are working fine.
Now your site is ready Congratulations!
- Select “Box”, For margin and padding enter “0”
- Select “Block”, For Text Align enter = center
- Click the styles.css tab at the top of the document window and save the styles.css file
- ID = header
- Click “New css style”
- Click “Box”. Click “Box”. Enter Width = 780 pixels.
- Padding = 0, Margin = Auto.
- Select “Type”.
- Specify Font = ‘Arial, Helvetica, sans-serif’.
- Size = 12 pixels
- Click “OK”.
- Insert > Layout objects > div tag.
- ID = logo
- Click “New style sheet” button, selector=#logo, click ok.
- Block > Text Align = left
- Box > Width = 50%
- Box > Float = Left
- Box > Padding/ Margin = 0
- Click OK . Click Ok.
Content for id "logo" Goes Here
”- Insert > Layout objects > div tag.
- ID = search
- Click “New style sheet” button, selector= #search, click ok.
- Block > Text Align = right
- Box > Width = 50%
- Box > Float = right
- Box > Padding/ Margin = 0
- Click OK . Click Ok.
- Insert > Form> Form
- Click inside the red dashed outline that appears
- Insert Form > Text Field
- Insert Form > Button
- Click on the button that appears and rename it in the Properties panel. Value = Search.
that appears at the bottom of the code view window. The entire header div code will be highlighted. Then you can easily click after the closing tag.
- Insert > layout objects > div tag. Name the div ID= menu.
- Create the #menu css style with the following properties:
- Box > Width = 780 pixels, Clear = both, Padding = 5 pixels, Margin = Top = 0, Left = auto, Right = auto, Bottom = 1
- Background > Background color > Click the triangle on the gray box to get the color palette and the ink dropper. Move the cursor to the flower in the logo and pick the yellow color.
- Block > Text align = left
- Click Ok
- Delete the default text that appears in the menu and type in the menu text “Home | Services | About Us | Contact Us”
- Insert > layout objects > div tag. Name the div ID= menu.
- Create the #content css style with the following properties:
- Box > Width = 780 pixels, Height = 300 pixels, Clear = both, Padding = 5 pixels, Margin > Top = 0, Left = auto, Right = auto, Bottom = 0
- Block > Text align = left
- Border > top/ bottom> solid> 1 pixel > pick green color from the leaf in the logo.
- Type > Size= 10 pixels
- Click OK
- Replace the default text that appears with “Copyright 2011 | Abhinav Pathak"
Type >
- Font color = black (pick from the color picker)
- Decoration = none
- Weight = bold
Now your site is ready Congratulations!
No comments:
Post a Comment