[SOLVED] Dreamweaver: Site-wide, design time style sheets using templates
Filed Under (software) by james on 24-01-2008
Tagged Under : adobe, css, design-time, dreamweaver, stylesheet
Prerequisites:
- Every page of your site must be a PHP file, or some kind of server side language file.
- You must use Dreamweaver templates to make the design-time stylesheet automatically apply itself to the pages of your site.
This solution is not going to work for everyone because of the two prereqs above; sorry about that. But if you do meet those requirements, then your life just got a LOT easier.
It’s simple:
- Open your template.
- Switch to code view.
- Go to the <head> tag
- insert this code:
<?php if (false) : //design time style sheet hack ?>
<link href="../css/yui-2.4.1-dwcs3-design-time.css" rel="stylesheet" type="text/css">
<!-- add as many DT stylesheets as you want in this area! -->
<?php endif; ?> - Save the template (and apply it to all the pages of your site).
Notes:
The linked stylesheet file is one I use to correct the rendering of a YUI Grids-based layout because natively, Dreamweaver renders it with the main .yui-b block taking only half of the space of the #bd element.
And a note to Adobe:
BUILD THIS FUCKING FEATURE INTO THE GODDAMNED SOFTWARE. (This is the first time I’ve ever sworn on the record on the Web. Sorry for offending non-Adobe employees.)

