Tip for using Design-time Style Sheets

| 5 Comments

Dreamweaver Design-time Style Sheets (DTSS) allow you to show or hide design applied by a CSS style sheet as you work in a document in Design View. They only apply while you are working on the document in DW. When the page is displayed in a browser window, only the styles that are actually attached to or embedded in the document appear in a browser. This is handy for working around shortcomings in DW's rendering engine.

DTSS are implemented as "User" style sheets. More info here:
http://www.w3.org/TR/CSS21/cascade.html#cascade

"By default, rules in an author's style sheet override those in a user's style sheet. However, for balance, an '!important' declaration takes precedence over a normal declaration. Both author and user style sheets may contain '!important' declarations, and user '!important' rules override author '!important' rules."
http://www.w3.org/TR/CSS21/cascade.html#important-rules

So, give your DTSS properties the !important modifier to always override what's on your page.

5 Comments

I most typically use DTSS for working with SSI where they come in quite handy.

I was sad to see that the link to a Design-Time style did not update when i changed the .css filename in the Files panel of a site I had defined in DW. I then had to delete and re-add all the DTSS. What a pain for all those files! I would think DW should be smart enough to update those links as well when a filename changes. I hope that oversight could be fixed on a future version.

Thanks,
Dan

Dan, Good suggestion! Thanks for the feedback.

It's a pain to have to set up DTSS individually for each page in DW, when I want the same stylesheet for all of my pages and want to hide one different stylesheet likewise in all pages.

Am I missing a method of applying this to an entire site or group of pages? I'm a beginner with DW so this could easily be the case.

Dan, Thanks for the feedback. I was not aware of that bug.

Kevin,

In general, you need to apply DTSS to each page, with the following exceptions:

Starting in DW CS4, all DTSS applied to a Template will be propagated to pages generated from that Template.

There is a commercial ($5) extension written by a third party that allows you to apply a DTSS to multiple files at once:
http://www.communitymx.com/abstract.cfm?CID=61265

Leave a comment

About this Entry

This page contains a single entry by Randy Edmunds published on January 28, 2009 5:44 PM.

Split Code View was the previous entry in this blog.

The CSS PI in CS4 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.261