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.

(more…)

Fixing IE: Stacking classes correctly

Monday, November 17th, 2008 by Jonathan Shroyer

I am once again thoroughly disgusted with IE6. I was working on a CSS template architecture and I needed to stack classes within the same div (ie. div class=”selector1 selector2″). Ordinarily, you can control your styles easily by simply writing in your CSS .selector1.selector2, which lets you stack styles using much less code. Of course, since IE6 is a piece of crap browser, it doesn’t work with stacked classes. If you want to know how to work around it… keep reading!

(more…)

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.