Client LoginView your Shopping CartHelp & Frequently Asked QuestionsEmail Us
Home Services Portfolio Web Design Pricing Dreamweaver Templates Web Applications Free Tutorials About Contact Us
Services > CSS Web Design | Professional Logo Design | ASP.net, ASP & PHP Programming | Flash Animation & Programming | Reliable Web Hosting | Website Maintenance
Portfolio > Web Design Portfolio | Web Programming Portfolio | Logo Design Portfolio | Web Design Pricing > Custom Web Design | Logo Design | Business Card Design
Web Design Guide > Website Design w/ Dreamweaver & Fireworks | Fireworks CS4 Cool Features | Photo Effects | Text Effects | Graphic Design Ideas | Web Design Ideas
Website Navigation Ideas | CSS Styles Tutorial | Dreamweaver Template | Server Side Includes | Flash Tutorials > Flash Effects | Flash Sound Button | Sound On/Off Button
Flash Preloader | Import External Data | Promotion > SEO Tips | Google Tips & Page Rank | JavaScript > Date Validation | Email Validation | Phone Validation | Tip Boxes

CSS Styles Tutorial

How to use CSS styles to format text in your web site.

Cascading Style Sheets (CSS) are a collection of formatting rules that control the appearance of content in a web page. They are very useful for maintaining a web site since its appearance (controlled by properties of HTML tags) can be managed from just one file. CSS Styles also enhance your site's look, accessibility and reduces file size. Another main advantage is reusability - instead of defining the properties of fonts, backgrounds, borders, bullets, uniform tags, etc. each time you use them you can just assign the corresponding css style in the class property. You can store CSS styles directly in each document or, for more control and flexibility, in an external style sheet.


Software Required

Adobe Dreamwever (Macromedia Dreamweaver prior to version 8). Please check out the compatible versions listed in the box below. Since this tutorial series covers the core functions of Dreamweaver to format text in your web site using CSS styles, mostly any version of these software should be fine.

Recommended version: Adobe Dreamweaver CS4

Compatible Versions of Dreamweaver for this Tutorial

Dreamweaver MX/MX 2004 | Dreamweaver 8 | Dreamweaver CS3 | Dreamweaver CS4
Note: Instructions remain same across all versions listed above, though some visual interface images might differ.

Prerequisite Knowledge

This tutorial teaches you how to format text in your web site using CSS styles in Dreamweaver and thus assumes you are familiar with some design software, even if you are new to Adobe Dreamweaver. However be assured that our detailed instructions can be followed by even a total novice.


You Are Here ::: Home >> Free Tutorials >> Dreamweaver Tutorials >> CSS Styles Tutorial

There are 3 types of CSS Styles:

How it works

CSS styles are defined within the <style> tag.

If you define the styles embedded within your current document you will find code similar to the following in your head content:

<style type="text/css">
<!--
.bluetext {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #000066;text-decoration: none;} -> Example of Class style:- apply using class property for any tag <p class="bluetext">

h1 {specifications} -> Example of Tag style:- for tag <h1>

a:link {specifications} -> Example of pseudo-class Advanced style:- applied to all <a> tags without any other style

#NewsBox {specifications} -> Example of ID attribute Advanced style:- applied to the tag whose ID property is set to NewsBox
-->
</style>

If you define the style in a external existing or new Style Sheet (recommended) you will find code similar to the following in your head content:

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

This code indicates that the document is linking to the external style sheet called styles.css located under the site root. If you open the style sheet in notepad you will find code similar to the code for the styles being embedded in the document. The big advantage of external style sheets is that the web site is easy to maintain and that when we make changes to the styles applied in the document, only the style sheet needs to be uploaded and not all the pages accessing it. As a practice, while using Dreamweaver, link you template(s) to the external style sheet so that all the pages using the template can use just one style sheet.

Creating a New Style Sheet and a new CSS Style

Open your site in Dreamweaver and do the following:

  1. Open any page of your site and select window > CSS Styles and Click the New CSS Style button (+ icon), a pop-up window will show up.
  2. Select Class in the Selector Type. Now type your style name in the Name box (example: .bullet). Use the Tag Selector Type for redefining HTML tags or the Advanced Selector Type for hovers, id attributes or combination of tags.
  3. Define the style in a New Style Sheet, give a name (example: styles.css) and save it under your site root. Click OK.
  4. In the CSS Style Definition pop-up window that appears give the Formatting Attributes like Font, List, Background, Border, Positioning, etc.

Applying the New Style

  1. To use this style just select and right click any tag in the tag selector located at the bottom left of the Document window. For the Set Class attribute select bullet from the list.
  2. While typing the HTML code use styles by setting the class property for any tag (example: <ol class = "bullet">).

Our Tutorial on Cool Text Effects using CSS Styles teaches the following:

Our Tutorial on using Bullets in HTML or Deamweaver teaches how to use CSS Styles with bullets (shapes, decimal, roman-numerals, alphabetical and images).

Our Tutorial on Links without Underline teaches how to use CSS Styles to display links without the appearance of the underline.

We would love to hear your comments and any suggestions on future tutorials we can add to this section. Thanks!

Fill the below form to submit your comments (or suggestions):
Bookmark and Share this web page.
Sponsored Link(s):
Beauty Templates | Business Templates | Christian Templates | CSS Templates | Education Templates | Family Templates | Flash Templates | Free Dreamweaver Templates
Food Templates | General Templates | Government Templates | Health/Medical Templates | Hi-Tech Templates | Kids/Childcare Templates | Low-cost Budget Templates
Personal Templates | Pets Templates | Photography Templates | Profession Templates | Real Estate Templates | Sports Templates | Telecom Templates | Travel Templates
Free Tutorials > Web Design Tutorials | CSS Web Design | Fireworks Tutorials | Dreamweaver Tutorials | Flash Tutorials | SEO Tutorials | Javascript Tutorials | PHP Tutorials