It's Goodbye and Good Riddance to .style1 in Dreamweaver CS4

By: Kim Cavanaugh

Page 1 of 2

Set for printing

Next

Introduction

No styleIf you've been fooling around with web pages as long as I have, you've seen a real revolution when it comes to the methods that are used for styling pages. From the early abandonment of frame-based sites, to the more prevalent reliance on CSS-positioning versus table-based layouts that we see these days, there has been a constant change in the world of web site design.

Perhaps the last, really nasty throwback to earlier times was the way that Dreamweaver wrote styling information for text when the Properties inspector was used. Beginning in Dreamweaver MX, Macromedia moved away from the use of font tags (Yeah!) for styling text and moved towards a method that used CSS. But the truly ugly means they used to do this was to create, by default, numbered class rules named .style into the head of the document. Every time you styled text, even just a little, a new .style rule was created. Within minutes of the release of Dreamweaver the Web was awash in thousands of .style1's, .style2's, .style3's and so forth. OK, maybe that's a slight exaggeration, but the truth is, I've seen Dreamweaver pages that I've had to help with that had dozens and dozens of .style rules written into the head of the document.

Did Dreamweaver even hint at the possibility of re-using some of the previously designed styles? Well, no, not really. Besides, with all those prominent and tempting styling buttons sitting right there! in the Properties inspector, many unsuspecting Dreamweaver users went blithely on their merry way, creating redundant rules, needlessly loading down their pages with all sorts of junk, and probably adding to Global Warming in some insidious way. Those things were evil I tell you, and even though I'm certain that the programmers at Macromedia, and now Adobe, didn't mean to unleash a pestilence of .styles on the world, the end result was a whole LOT of code being published on-line that should never have seen the light of day. Even creating those few lines of text in this document produced the chunk of code you see below. And of course I have an unused .style1 class sitting up there since I experimented with black text before I decided on red. Ugly? It sure is.

<span class="style2"> light of day</span>.</span>

Adobe Sees the Light in Dreamweaver CS4

I remember a TODCON presentation by Greg Rewis (one of the lead programmers for Dreamweaver) a few years ago where he opened the floor to questions at the end of his talk. People in the room set upon poor Greg like a pack of ice weasels, wanting to know when the dreaded .style1 would be banished from the face of the earth.

The thinking went like this. By enabling Dreamweaver users to write bad code that was difficult to edit, the company was doing their users a terrible disservice. Couldn't there be some other method of creating in-line styles that wouldn't be so incomprehensible to users? Must those of us who support and train Dreamweaver look at page after page where good, hard-working newbie web designers had inserted extraneous garbage into their pages? Come on, how about taking some responsibility for leading users in the right direction instead of taking them into a rat trap of dozens of .styles?

It's taken a while, but I'm happy to report that Adobe has finally seen the light and in the newest version of Dreamweaver the .style method has disappeared forever. And while it might take you a while to get used to the new interface, trust me when I tell you that you'll be MUCH better off by using the new methods that Dreamweaver CS4 employs for styling text.

Page 1 of 2 1 2 Next


download
Download Support Files


Keywords
.style1, Properties Inspector, CS4