Archive for the ‘Dreamweaver’ Category

Easy IE Conditional CSS with No Hacks!

Thursday, January 15th, 2009 by Jonathan Shroyer

Any serious CSS person has hacked their way through more ‘Internet Exploder’ issues than they care to talk about. Even if there are only a few small issues to fix in an area, it can be difficult to track them through multiple style sheets (ie. conditional sheet for IE6 & 7). Hacks are just bad practice, so what can you do? There is a better way! I came up with a neat little piece of code that has greatly simplified my life when dealing with cross-browser compatibility.

Read the rest of this entry »

Shortcut to converting to CSS shorthand

Thursday, December 7th, 2006 by Jonathan Shroyer

I’m sure I’m not the only one who started out with CSS longhand and slowly moved toward shorthand. If you are going through old code and converting it to shorthand, 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. 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, 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 the dialog box.