using templates and cascading style sheets10

37
Using Templates and Cascading Style sheets In Dreamweaver CS3 Methods for establishing Consistent House Style

Upload: sutinder-mann

Post on 06-May-2015

822 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Using Templates And Cascading Style Sheets10

Using Templates and Cascading Style sheets In Dreamweaver CS3

Methods for establishing Consistent House Style

Page 2: Using Templates And Cascading Style Sheets10

Diagrammatic Representations of what they do. Consider updating loads of pages

Both do a similar Job but Templates are easier to set up and use and do not involve adapting any code. CSS results in simpler and cleaner HTML code, which provides shorter browser loading times.

Template or CSS

Page 1

Page 2

Page 3

Page 3: Using Templates And Cascading Style Sheets10

Understanding Dreamweaver templates

A template is a special type of document that you use to design a “fixed” page layout; you can then create documents based on the template that inherit its page layout. As you design a template, you specify as “editable” which content users can edit in a document based on that template.

Using templates enables you to update multiple pages at once. A document that is created from a template remains connected to that template (unless you detach the document later). You can modify a template and immediately update the design in all documents based on it.

Dreamweaver templates are fixed (or uneditable) by default.

Page 4: Using Templates And Cascading Style Sheets10

Editable Region

Non Editable Region or Fixed Region

Page 5: Using Templates And Cascading Style Sheets10

Templates

Page 6: Using Templates And Cascading Style Sheets10

Insert Table and reduce Border

Page 7: Using Templates And Cascading Style Sheets10

Modify Table and Add Website Banner

Page 8: Using Templates And Cascading Style Sheets10

Set up according to your Design Plan for House Style

Page 9: Using Templates And Cascading Style Sheets10
Page 10: Using Templates And Cascading Style Sheets10

Select the required font for the Heading and make it Editable.

Page 11: Using Templates And Cascading Style Sheets10
Page 12: Using Templates And Cascading Style Sheets10

Here is the final Template. Note the Banner region remains fixed.

Page 13: Using Templates And Cascading Style Sheets10

Page based upon Template as follows

Page 14: Using Templates And Cascading Style Sheets10
Page 15: Using Templates And Cascading Style Sheets10
Page 16: Using Templates And Cascading Style Sheets10

Another Template

Page 17: Using Templates And Cascading Style Sheets10

Pages from Template

Page 18: Using Templates And Cascading Style Sheets10

Cascading Style Sheets (CSS) is a collection of formatting rules that control the appearance of content in a web page. Using CSS styles to format a page separates content from presentation. The content of your page—the HTML code—resides in the HTML file, and the CSS rules defining the presentation of the code reside in another file (an external style sheet) or in another part of the HTML document (usually the head section).

Separating content from presentation also results in simpler and cleaner HTML code, which provides shorter browser loading times, and simplifies navigation for people with accessibility issues (for example, those using screen readers).

CSS gives you great flexibility and control over the exact appearance of your page.

About Cascading Style Sheets

Page 19: Using Templates And Cascading Style Sheets10

Cascading Style Sheets• Work in a similar way but use an external file rather

than a Template. This then calls the style into the HTML through the addition of a line referencing it to the code or attaching a style sheet.

<link rel=“stylesheet” href=“style1.css”> </head>

• See Example exercise and sample code.

Page 20: Using Templates And Cascading Style Sheets10

Apply your formatting by using style sheets.Make sure these are in users’ folders before you start.

1. Use View, HTML to view the HTML coding.

2. Add the reference to the style sheet in the head section.

3. Save and preview.4. Edit the style sheet as

appropriate.

Page 21: Using Templates And Cascading Style Sheets10

Style sheet one

Page 22: Using Templates And Cascading Style Sheets10

Style sheet two

Page 23: Using Templates And Cascading Style Sheets10

Style sheet three

Page 24: Using Templates And Cascading Style Sheets10

Style sheet four

Page 25: Using Templates And Cascading Style Sheets10

New Style Sheet

Page 26: Using Templates And Cascading Style Sheets10
Page 27: Using Templates And Cascading Style Sheets10

Replace td and th as h1 and h2

Page 28: Using Templates And Cascading Style Sheets10

Change colour by clicking into each section and selecting background colour and then font-size and color for it.

Page 29: Using Templates And Cascading Style Sheets10
Page 30: Using Templates And Cascading Style Sheets10
Page 31: Using Templates And Cascading Style Sheets10
Page 32: Using Templates And Cascading Style Sheets10
Page 33: Using Templates And Cascading Style Sheets10

Style sheet Applied

Page 34: Using Templates And Cascading Style Sheets10

BasicStyleSheet Code

body {font-family: Arial, Helvetica,

sans-serif;background-color: #CCFFFF;

}

h1 {font-family: Arial, Helvetica,

sans-serif;color: #0000FF;font-size: x-large;

}

h2 {font-family: Arial, Helvetica,

sans-serif;color: #FFFF00;font-size: large;

}

Page 35: Using Templates And Cascading Style Sheets10
Page 36: Using Templates And Cascading Style Sheets10

AdvancedStyleSheet Code

h1{color:red;font-family: Arial,Helvetioca, sans-serif;font-size: xx-large}

h2{color:red;font-family: Arial,Helvetioca, sans-serif;font-size: x-large}

a{text-decoration:none:font-style:italic-transform:lowercase}

a:link(color:red;font-weight;bold}

a:visited {color:blue}

A:hover {color: green;text-transform:uppercase}

a:active{color:green}

Page 37: Using Templates And Cascading Style Sheets10

Create a More Advanced CSS sheetSee

http://www.w3schools.com/CSS/css_examples.asp