Friday, 16 November 2012

Dreamweaver [2]

All blogging below:


To center align the container, use percentages.
Ensure the margin-left is at half the container width.















To create multiple pages, it is best to create a Dreamweaver template (DWT).
This should be set up prior to coding the site. All subsequent pages use the same styling.
e.g. adding a new button to the template adds a button to all corresponding pages
Need to tell Dreamweaver what areas are editable regions.


















There is usually one editable region — the content / container div
Inside this, you add the rest of the divs that make up the site
Only the container div will change when edited in the template












File > Save as Template and change name from index
A templates sub folder will appear with the site files
Delete the original index.html file
File > New > Page from template then save as index
























Buttons / Rollover images

Ensure the images are saved at the lowest file size possible
Don't need to include a solid background in the images — this can be done in Dreamweaver
Use JPEG if the image has no transparency; png 24 if otherwise
















You are able to select various file types and sizes
Choose PNG-24 as the buttons use transparency




Adding rollover images, go to Insert > Image Objects > Rollover Image
Locate the files and ensure it links to the correct page




































Box Model

  • Margin — Clears an area around the border. The margin does not have a background color, it is completely transparent
  • Border — A border that goes around the padding and content. The border is affected by the background color of the box
  • Padding — Clears an area around the content. The padding is affected by the background color of the box
  • Content — The content of the box, where text and images appear

Avoid using margins, use padding instead
Can use padding-left, padding-right etc














Every setting you add, increases or decreases the width of the div
The WIDTH of a div is is the width of the CONTENT
Otherwise, it will end up like this:



No comments:

Post a Comment