Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > CSS

  • Print
  • + Share This
From the author of Disabling CSS Properties

Disabling CSS Properties

One widely used—and helpful—CSS coding technique is to "comment out" features that you might want to turn on later. By changing CSS coding to a comment, you leave the code in the style sheet file, but essentially disable it. If you want to activate that code, the protocol is to remove the comment tag, making the code live. Dreamweaver CS5 includes a new tool in the CSS Styles panel that provides an equivalent capability—without forcing you to resort to editing CSS code.

Here's how you disable a CSS attribute without removing it:

  1. In the top half of the CSS Styles panel, select a CSS rule to edit.
  2. With the CSS rule selected, go to the bottom half of the CSS Styles panel and hover over the left edge of the particular attribute you want to disable. The international "no" symbol (a circle with a slash through it) appears by the attribute's name, as shown in Figure 6. Click to disable the attribute.
  3. Figure 6 Disabling a CSS style rule attribute.

  4. To reverse the process, hover over the left edge of the attribute in the bottom of the CSS Styles panel, and then click to enable the attribute.
  • + Share This
  • 🔖 Save To Your Account