Accesskeys:

[`] Navigation, [s] Content, [=] Top of Page, [1] Home page, [3] Site map, [4] Search, [9] Quote Request, [0] Access key details

Next: Content. Select to move to navigation [`]

Pathway

Home arrow Developer Center

‘corePHP’ Developer Center

Shortcut to converting to CSS shorthand 

July 12th, 2006

I’m sure I’m not the only one that started out with CSS longhand and slowly moved toward shorthand. If you are going through old code and converting it to shorthand, then try this nice quick trick for making Dreamweaver do the dirty work for you.

First of all make sure your preferences are set up for shorthand by going to Preferences > CSS Styles. Pick all the css that you would like to have made into shorthand. Make sure you have Edit Using CSS checked for this to work. Click OK. Now go to your style sheet and find the code you would like to convert to shorthand. If it’s a font then simply change the font-family: to font:, click on the css styles box, then double click on the style you just changed. When the css style dialog box comes up simply change or add one thing and click OK and all your font tags will be converted into the same tag. For margins and padding you just have to open the css dialog box and fill in the empty boxes with 0. When you click OK then they will all be converted into shorthand for the tag you edited. I personally think it’s faster to convert margins and padding by hand, but it’s a nice time saver if you are already in dialog box.

Leave a Reply

You must be logged in to post a comment.



Next: Navigation. Select to move to content [s]

Site Navigation


Basecamp project management and collaboration