Viewers: in countries Watching now:
Managing CSS in Dreamweaver with James Williamson shows how to create cascading style sheets that are efficient, reusable, and easy to navigate. In this course, James shares tips on how to find and use panels and tools, and how to deploy style sheets to screen, print, and mobile environments. Course topics include creating customized starter pages, learning to rapidly hand-code CSS through using Snippets, and using Dreamweaver's CSS preferences to deploy lightweight styles. Exercise files are included with the course.
Dreamweaver's flexible interface allows us to create custom workspaces that are tailored specifically for the task at hand. By taking advantage of the preset workspaces, or in the case of this exercise building your own, you can make it a lot easier to switch from one task to another. So in this movie, we're going to build a custom workspace that is focused on working with styles. So you can see I'm currently working without a document open. One of the things you want to do when you're customizing the interface with Dreamweaver is make sure you're seeing everything. So I'm just going to go ahead and use the Welcome screen here to create a new HTML file.
We don't need to save it. We don't need to do really anything with it. It's just there so that we can see the remainder of our workspace. Okay, one of the first things I want to make sure we're doing is all starting more or less in the same place. So you can see that I currently have the Designer Workspace. If I grab the pulldown menu, I can see that there are a lot of preset workspaces. I'm going to start with the Classic Workspace. Now the reason I like starting with the Classic Workspace, in sort of using that as a starting point, is it takes the Insert panel, and it docks it up here above the document itself.
I just like it there. It fits there a little bit better. It gives me a nice horizontal menu to work with, rather than having another panel to worry about. In the case of higher screen resolutions, it actually saves a little bit of screen real estate. So, I kind of like it being up there. Now at this point, we're really going to need to do a good bit of modification. The first thing I'm going to do is start over here in the doc. I'm going to close everything that's not directly related to working with your site's CSS. Now the browserlab panel, which is new in CS5, is related to working with CSS; however, if I want to preview using Adobe's browserlab, I can do that directly here through my Preview icon.
You can see there is the option right there. So, devoting an entire panel to that, if I'm not going to be using the panel, really doesn't make much sense. So I'm going to go ahead and go right over here to the Panel menu, and I'm just going to close that tab group. That's going to leave the CSS Styles, AP Element, and Tag Inspector panels together. Now, I don't use the AP Elements panel that often, but it does allow me to see certain elements on the page, if I'm using absolute positioning. So I think I'll leave it alone. The Tag Inspector really isn't hurting anybody by being there either. So I'll just leave the CSS Styles panel.
It's kind of the default panel from that group. Well, there is another panel group directly underneath this, Databases, Bindings, and Server Behaviors. Since I'm focusing on styles and not dynamic development, I'll go ahead and close that tab group as well. Cool! Now that leaves me with Files, Assets, and Snippets. Now if you don't see the Snippets panel, and the reason that we're seeing it is because we're starting with the Classic space, if you don't see that, you're going to want to open that. You can do that by going up to Window and choosing Snippets. Ours doesn't have a checkmark beside it, but it is part of that group. So I don't need to select that, but if I do, notice that it just focuses on the panel within the group.
It doesn't really close anybody else out. So I want to make sure the Files and the Snippets panel are docked right over there. Now I'm not going to include anything else in the dock. If you have a high screen resolution and you have a lot of screen real estate, and you want to put some more panels over there, nothing wrong with that. This is just going to be our CSS- focused workspace, so we don't really need any of those other items. Now, one toolbar that I want that isn't opened, by default, is the Style Rendering toolbar. So, I'm going to go right over here to my Document toolbar, I'm going to right-click on that, and I'm going to choose Style Rendering from the menu that comes up.
You could Ctrl+click on the Mac if you'd like, if you don't have a two-button mouse. Now, that's going to bring up the Style Rendering panel. So I'm just going to undock this and float it for just a minute, so you guys can see this. Now, that's another big difference between the Mac and the Dreamweaver interface. For those of you on the Mac, if you just try to undock the Style Rendering toolbar, you are unsuccessful. It docks in the Document toolbar, and it just sort of stays there. But on the PC, we're free to kind of put this anywhere that we want. So, I'm just going to go ahead and move this to another location. I'll place him me on right here in the same little line with the Document toolbar.
Now you may have noticed that we can't see the whole thing. Well, that's okay because if I really need to, I can collapse my panels down the icons, and I'll have full access to that. So I can just sort of toggle those back and forth when I need to get to these pseudo-selectors. Now, what the Style Rendering toolbar does for us is it allows us to look at our print styles, or screen styles in sort of isolation, or turn our Style Rendering on and off within Dreamweaver's Design View. So it's a very, very handy toolbar to have around when you're working with your styles. Now, there is one last thing I want to do here, and I'm going to go up to the Windows menu.
I'm going to go down to Results, and I could really choose any of these. It doesn't really matter. So I'll just choose Search, which is the first one. That's going to bring up a much larger panel group. This has the Search, Reference, Validation, and what we're really interested in here is in Browser Compatibility panel. If we do a Browser Compatibility check on our CSS, the results are going to show up there, so it's a good idea to go ahead and have this opened. Now obviously, this is not a very efficient workspace. So, what I'm going to do is take the Properties tab right here, drag that down so that it groups with these guys, and then I could even take the Properties tab and move it all the way over here to the left.
So, it's the first panel in the group. I just kind of like it having that sort of default location. So there we go! We've got a workspace now that is going to work for us while we're working with our CSS. We have our CSS Styles panel. We have Snippets where we can save snippets and code, if we're working with certain styles that we want to reuse later. We have our Style Rendering toolbar, and our Results panel group is docked with our Properties Inspector. So, that's perfect! Well, you don't want to have to keep doing this every single time you work on your styles. So, I'm going to go right up here to the workspace switcher, and I'm just going to choose New Workspace.
I'm going to call this workspace CSS. I'll go ahead and click OK. That's part of my menu structure now. I can switch back to CSS at any time. So, if I go back to Designer, for example, or if I go to the Coder environment, it's really easy for me to just come right back up here, choose CSS, and it takes me right back to where we were. Cool! So, we now have a workspace that gives us quick access to all the tools we need in Dreamweaver when working on our styles. Now, this workspace is going to allow us to focus on our styles and save us a good bit of time that we would normally spend opening, closing, and arranging panels for each new task.
So, regardless of what you're doing in Dreamweaver, whether you're working on styles or working in a coding environment, I'd recommend considering creating a custom workspace for that particular task, so you don't spend so much time opening and closing panels.
There are currently no FAQs about Managing CSS in Dreamweaver.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.