Accessibility

TechNote

Removing CSS Classes from a Dreamweaver page

Issue


Custom Class CSS styles were applied to a page. After adding the styles, it was decided that they were not needed. Is there an easy way to remove the CSS tags from a Dreamweaver page?

Solution



Completely deleting a Custom Class CSS style from a Dreamweaver page involves removing the styles from both of the following locations:

The objects affected by the styles on the Dreamweaver page.
The head section of the HTML code.

Even if a style is removed from a selected object, the class definition will remain in the HTML code. The style tag affecting a particular object delimits the selection and identifies it as belonging to the custom class. The tag in the head of the document describes the appearance of the class. Both instances of the CSS style in the HTML code will need to be removed.

Step 1: Removing a Custom Class style from objects affected by the style

1

Select an object affected by the style.

2

Choose Window > CSS Styles if the CSS Styles panel is not already open.

3

The style affecting the object will be highlighted in the list of styles on the CSS Styles panel.

4

Click the (none) option located at the top of the list of styles.

5

Repeat steps 1 through 4 for each object affected by the style.

Step 2: Removing a Custom Class style from the head section

1

Deselect any selected objects on the page. Nothing on the page should be selected.

2

Choose Window > CSS Styles if the CSS Styles panel is not already open.

3

Click the name of the Custom Class style you wish to delete in the list of styles .

4

Click the trash can icon at the bottom right of the CSS Styles panel.

To remove all the Custom Class styles from a page
To remove all the Custom Class CSS styles from a page, repeat Step 1 and Step 2 above for each Custom Class CSS style listed in the CSS styles panel. After all the Custom Class CSS styles have been removed, you will still see an empty style tag in the head section of the HTML code. The empty style tag looks like:

<style type="text/css">
<!--
-->
</style>

Note that the style tag contains only empty comments. Although you can delete the empty style tag, leaving it as is in the head section will not affect your Dreamweaver page.



AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_15119

Products Affected: