How to get Dreamweaver to give you better CSS

Dreamweaver is often criticised for creating unnecessary long handed CSS, when a user is using the in built CSS editor. For example using the default settings Dreamweaver would create the following when you want a div with a right hand border:


div {
 border-right:solid;
 border-color:#00000;
 border-width:1px;
}

When the following would suffice:


div {
 border-right:1px solid #000;
}

To change the default Dreamweaver CSS settings you can do the following:

Mac
From the top menu select Dreamweaver > Preferences > Category – CSS > You’ll see “shorthand” selection boxes select all of the boxes and make sure that the radial buttons for “According to the settings above” and “Edit using CSS dialog” are also selected and click ok. This will make Dreamweaver use shorthand for the following rules:

  • Font
  • Background
  • Margin
  • Padding
  • Border and border width
  • List style

Windows
Follow the above however to access the preferences you have to do the following:

From the top menu select Edit > Preferences.