Home arrow Web Standards arrow Page 2 - Web Standards in Dreamweaver, Part 2

Web Standards in Dreamweaver, Part 2

This article walks you through setting the preferences for working with CSS in Dreamweaver, how to work with the CSS style panel, linking to the stylesheet, improvements to the Propert Inspector, how to creat new XHTML documents and more. (From the book ASP.NET Web Development with Macromedia Dreamweaver MX 2004, by Costas Hadjisotiriou, with Rachel Andrew and Kevin Marshall, published by Apress, 2004, ISBN: 1590593480.)

Author Info:
By: Apress Publishing
Rating: 4 stars4 stars4 stars4 stars4 stars / 7
September 08, 2004
  1. · Web Standards in Dreamweaver, Part 2
  2. · Creating Classes
  3. · The Property Inspector
  4. · Design Files: Premade CSS Stylesheets
  5. · Creating Valid Markup

print this article

Web Standards in Dreamweaver, Part 2 - Creating Classes
(Page 2 of 5 )

Creating classes in Dreamweaver is as simple as redefining an HTML tag.

  1. Open the New CSS Style dialog box once again and select the Class (can apply to any tag) radio button. Next, in the text box at the top of the dialog box, enter a name for your class. It must begin with a period.

  2. Click OK and the familiar dialog box will open, allowing you to set the properties for this class. Set the properties you want and click OK. Your new class will appear in the CSS Styles panel.

Attaching a Stylesheet

When you create a new stylesheet, Dreamweaver attaches it to your page automatically. However, if you already have a stylesheet that you want to attach to the page, you can attach it using the Attach Stylesheet button on the bottom of the CSS Styles panel.

The dialog box that appears allows you to browse for your stylesheet. Use the two radio buttons to select whether you want the stylesheet to be linked or imported.

Linking to the Stylesheet

Linking to the external stylesheet is the usual way of attaching a stylesheet to your page. Selecting this option will attach your stylesheet to your page with the following markup:

<link href="global.css" rel="stylesheet" type="text/css" />

This way of attaching a stylesheet is supported by all CSS-enabled browsers, and it is what you should do if you need to support browsers such as Netscape 4 with your web page.

Importing the Stylesheet

If you choose to import, the stylesheet will be attached with the following markup:

<style type="text/css">
     @import url("global.css");

This way of attaching a stylesheet is not recognized by version 4 browsers, but you can use this to your advantage when you have to deal with buggy CSS support in these older browsers. We will return to this subject later.

This chapter is from ASP.NET Web Development with Macromedia Dreamweaver MX 2004, by Costas Hadjisotiriou (Apress, 2004, ISBN: 1590593480). Check it out at your favorite bookstore today.

Buy this book now.

blog comments powered by Disqus

- Mozilla Popcorn Maker 1.0 Makes Videos More...
- Completing a Configuration for Chrome and a ...
- Getting Connected with Firefox and Chrome
- Configuring Servers and Databases with Chrome
- Configuring Firefox for Chrome and a Server
- Designing the Elements of a Web Page
- Matching div heights with CSS and JavaScript
- Forms
- Get Down With Markup
- If I Said You Had a Beautiful Body...
- Web Standards in Dreamweaver Part 3
- Web Standards in Dreamweaver, Part 2
- Web Forms
- Making Lists Using XHTML
- Web Standards in Dreamweaver, Part 1

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials