Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Covering diverse topics such as improving workflow and managing CSS styles, Dreamweaver CS3 Beyond the Basics is a hands-on course that teaches users how to move beyond standard, static websites. Instructor James Williamson explores how to increase productivity, interactivity, and accessibility with Dreamweaver. He also discusses how to extend the application's capabilities with XML and XSL. Exercise files accompany the tutorials.
I this chapter we will examine Dreamweaver's extensive CSS capabilities and explore a few concepts that will make tackling page layout in our next chapter much easier. We first want to focus on the CSS Styles panel, since it's the nerve center for creating managing and editing styles in Dreamweaver. Now for those of you following along with our example files, we have defined a site for the Chapter 2 folder and I want you to go in your Files panel and opening the file rendering.htm. So here we have a sample file that has a few different sections of content, some headings, some paragraphs and in this chapter we are going to see how we can target different areas of this by taking advantage of a couple of CSS concepts. Before we get into that however I want to talk about the CSS Styles panel that you can find that panel at the very top of your panel stacking order and it's positioned right beside the renamed AP Elements panel.
The AP Elements used to be called Layer in the last version of Dreamweaver and I am really happy that they have renamed it AP Elements because Layer wasn't the title I was really comfortable with. All right, so, I am going to roll up or collapse my Files panel and that will give me a little bit more room when I am working with my CSS Styles panel. And first I am going to click on the button All. There are two buttons at the top of it and there is Current and there is All, and All gives me a nice overview of every rule that's affecting my file, and you can see there are really three panes to the CSS Styles panel and right now I am going to grab this little dividing line to pull this down a little bit further and that gives me a little bit more room and I can see all my styles. I have got an external style sheet called rendering.test.css applied to the page, and I know it's an external style sheet because it actually says .css, giving me the filename. Now we have an embedded style and we are about to create one of those in a moment. Dreamweaver actually represents style tag in ahead of the document for you. So you can really tell the difference and tell what type of style it is. Well if I click on one of the rules. Notice that just below, in the pane below, my All Rules panel, I am getting properties for that specific rule. You can see that the body tag has a color applied to it, a font-family, a font-size and a line- height. Now all the way down at the bottom of the CSS Styles panel, we have a series of icons, and the icons on the right-hand side, you are probably familiar with, they give you the attach style sheets, create new rules, edit an existing rule and delete a rule if you want to. But it's the icons on the left- hand side, these three icons that I really want to pay attention to here. If you hover over them, they will actually give you different views. You have got category view, you have got list view and my favorite, which is Show only set properties. If you try the first one, which is Show category view, notice that you get instead of a list of just the properties that have been applied you get a series of categories. Font, Background, Block, so forth and so on. And these correspond exactly to the property categories that you would see in the CSS Rules definition dialog box.
So if you are used to using that dialog to create your styles, this is the view that's going to give you, exactly what you are used to seeing in that particular view. I find this one a little hard to find exactly what's been applied. So I am not a big fan of this one, but if you define a lot of your styles using the CSS Styles Definitions panel, then this might be more your taste. Now the middle icon shows list view and what this does for you is it shows you every rule that's applying to your style up top in blue and then every available rule after that that hasn't been applied is actually there in alphabetical order. You can see as I start to scan down, I am going through backgrounds and borders and so forth and so on. So when I go back up, if I wanted to apply another property to this, I would simply click on the property I wanted to apply and I could type in a value for in the left-hand side. I can even use this to modify existing properties. So if I want to change my font-size for example, if I wanted to take the font-size with my body tag and move that up to 1m instead of .95, I could do that right there without actually having to go back into the CSS Styles Definition dialog box or even going to code itself, and I will just change that back, .95. And you can see it actually modifies the content underneath it. Now my favorite view as I mentioned before is the third icon and this one is the Show only set properties. I am a big fan of this one, because it really gets through the clutter as I click on each of the rules. Notice that only the properties that apply to that rule show up. All the rest of them are hidden. Now you can still modify the properties here and you can even add additional property. So if I came up to heading1 for example and I decided that for my h1s I wanted a specific background color. I could click Add Property and I could begin typing in, and although it doesn't look like I am getting code hinting, when I click on the pulldown menu, notice that just by typing in the word back, it jumped me down the list and I could find background color pretty easily. Now I could type in a color value or even give me the color-picker here that would allow me to go in and choose a specific color-picker and you can see on the page that my heading has that background color applied to it. And of course if I decide that I don't like a property, maybe I look at that and say that's not so great. I can grab that particular property, click on the trashcan and it just deletes that property. It doesn't delete the whole rule. So it offers you a lot of flexibility when modifying and updating your current styles. Now if we switch over to current view, you can see that based on where I have selected over here, I am going to see a series of rules. Now I might actually have to resize a couple of these panels so that I am getting my summary correct. So every now and then you are going to have to go in and sort of redo some of these. But you will notice that as I click on a different property or a different element, I am actually seeing another set of rules up here and I will have to scroll up to get those. But you can see as I click around the page and I click on heading -- the sidebar heading over here, I see one set of rules. When I click on my main heading over there, I see another set of rules and when I click on paragraph I see another set of rules.
I am looking at the summary for selection area up the top, and if you hover over, almost every element, you will get a tool tip that tells you where that rule is defined, which is really nice. As you click through the different rules, all the different rules down here, you will actually see where it's been applied. Now the middle panel here, it doesn't look that effective at the moment, but it's actually one of the most effective sections of the CSS Styles panel. You will notice that there are two icons in the middle panel on the right-hand side. The first one shows information about the selected property.
The second one actually shows a cascade of rules. Now we are going to talk about the cascade in the next movie. But briefly, the cascade shows us exactly which rules are applying to an element on the page. So if I click in the sidebar paragraph for example, you can see that it actually lists, one, two, three, four rules in the order that they are applied. So I can actually see all of the selectors that go into styling this particular element and the order in which they will be rendered within the browser. That's a tremendous amount of information for you when you design your CSS Styles and it can really help you rapidly edit and find your errors in your styles. So the CSS Styles panel is the nerve center of working with your CSS styles as we go into the remaining units in this chapter and our CSS Layout chapter later on, we will be using this panel extensively and we will actually use this view to troubleshoot a lot of the things that we run into. In order to explore some of the more advanced CSS concepts that we touch on, our next few movies will focus on three core CSS techniques that form the bedrock of truly understanding how cascading style sheets work, we will explore the cascade, order of inheritance and specificity, and we will start by examining the cascade.
Find answers to the most frequently asked questions about Dreamweaver CS3 Beyond the Basics.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
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.