View comments | RSS feed

Attach a style sheet

When you attach a style sheet to a web page, the rules defined in the style sheet are applied to the corresponding elements on the page. For example, when you attach the cafe_townsend.css style sheet to the index.html page, all paragraph text (text formatted with the <p> tag in the HTML code) is formatted according to the CSS rule you defined.

  1. In the Document window, open the Cafe Townsend index.html file. (You can click its tab if it's already open.)
  2. Select the text of the first paragraph that you pasted into the page in Tutorial: Adding Content to Pages.



  3. Look in the Property inspector and make sure that the paragraph is formatted with the paragraph tag.

    If the Format pop-up menu in the Property inspector says "Paragraph," the paragraph is formatted with the paragraph tag. If the Format pop-up menu in the Property inspector says "None," or something else, select Paragraph to format the paragraph.



  4. Repeat step 3 for the second paragraph.
  5. In the CSS Styles panel (Window > CSS Styles), click the Attach Style Sheet button in the lower-right corner of the panel.



  6. In the Attach External Style Sheet dialog box, click Browse and browse to the cafe_townsend.css file that you created in the previous section.
  7. Click OK.

    The text in the Document window is formatted according to the CSS rule in the external style sheet.


Comments


grilledsardine said on Nov 7, 2005 at 6:24 AM :
when i try to attach the css document i keep getting an error message that says: "A recurisve style import was found while trying to add cafe_townsend.css. Please resolve this error by editing the file in an external text editor and try again."

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/dreamweaver/8/using/gs_06_c6.htm