Video: An overview of the CSS Styles panel

The CSS Styles panel acts as a central hub for all things CSS in Dreamweaver, providing you with both a global view of all document styles, as well as allowing you to focus on individual rules in style applications. You'll find the CSS Styles panel in the CSS Panel Group, which is usually located at the top of the panel dock, although you can reposition it in custom workspaces if you'd like. If you don't see the panel, you can go up to Window and choose CSS Styles, and it should open up. Now, at the top of the panel you'll find buttons for two views; All and Current.

Discover how to build web sites, prototypes, and more in this course on Adobe Dreamweaver CS6. Author James Williamson shows designers how to take control of their site by properly naming and structuring files and folders; how to create new documents and web pages from scratch or with starter pages; and how to add content such as text, images, tables, and links. James also provides a background on the languages that power projects built in Dreamweaver—HTML and CSS—and introduces the programming features in the application, for developers who want to dig right into the code. The last chapter shows how to finesse your project with interactive content such as CSS3 transitions and Spry widgets.

An overview of the CSS Styles panel

The CSS Styles panel acts as a central hub for all things CSS in Dreamweaver,providing you with both a global view of all document styles, as well asallowing you to focus on individual rules in style applications.You'll find the CSS Styles panel in the CSS Panel Group, which is usuallylocated at the top of the panel dock, although you can reposition it in customworkspaces if you'd like.If you don't see the panel, you can go up to Window and choose CSS Styles,and it should open up.Now, at the top of the panel you'll find buttons for two views; All and Current.

The Current View gives you a detailed view of all the rules applied to aselected element, while the All View gives you an overview of all the CSS Stylesapplied to the current document.Before we start creating styles in earnest, let's take a moment to getcomfortable with finding our way around and using the CSS Styles panel.So to do that, I am going to work with the index file that we have here from the 06_02 folder.And you may have noticed the CSS Styles panel takes up a lot of room, especiallywhen you have a lot of styles going on, so what I've done is I've sort ofminimized all the other panels.

The Files Panel, I've got that minimized, I just have the CSS Styles Panel opened up.Now, currently we're looking at the All view, we'll take a look at the Current view in just a moment.And what I'm doing is with this Properties pane I am same sort of bringing it downa little bit so I can see more of these rules. All right!So currently what I am looking at right now is, I am looking at all of the rules that apply to the current document that I have open.So every time you open up a new document, if you have a different set of rulesthat apply to that, or that it's linking out to, you are going to see those listed there as well.Now, I want to minimize these really quickly so you can see the difference in how the CSS Styles Panel reports on the styles that you have attached to that particular document.

The first thing that I see listed is main.css.Now, that tells me that this is an external style sheet.How do I know it's an external style sheet?Well, there are a couple of reasons.Number one, I know because it has a .css extension, and number two, it's notwithin this sort of style tag that you're seeing here.Anytime you see the style tag represented like this, that's essentiallyan embedded style that's contained within the style tag in the head of the document.If I, for example, were to go over to Code View, you can see in the head ofthe document I have that style tag right there that's being reported by the CSS Styles panel.

And what's nice about that is it means that you're not going to have to do a lotof hunting through the code of your file to figure out which styles have beenapplied and what order those styles are in.The other very interesting thing here that we have about the CSS Styles panelis that the order that you see these in are the order that they are encounteredin the code itself.And that actually is very, very important to CSS, because CSS has somethingcalled the cascade, cascading style sheets.Cascade basically says last rule applied wins.So obviously any rule that's further down this list, if there is a conflictto the rule above it, for the most part that rule is going to override the rule above it.

So this also helps you get an idea as to which styles are being applied and whatorder they are being applied in.Another thing that we get from this sort of basic overview of all the styles inour file are these two properties right here:screen and projection.That's basically telling you the value of any media attribute that has beenapplied to our style.So it's basically saying, okay, these particular styles are going to apply toany devices that are screen devices or projection devices.Now, that's actually handled when you use links to link to an external style,that's handled through this media attribute that you're seeing right here, sothat's being reported in the CSS Styles dialog box, and once again, that'ssomething that I'm not going to have to go into the code and check.

Now, if I don't see something there, that means the media attribute has not been defined.Now, as soon as I expand this, I can see every single rule in my externalstyle sheet, which makes it very easy to scan through and kind of find whatyou are looking for.Now, obviously, how you've organized the style sheet matters, because you aregoing to see these rules in the exact order that they are found.Now, if you decide to highlight one of these rules or focus on it in any way,you're going to get even more information.So if I click on this rule right here, this pageHeader h1, you'll notice thatthe Properties panel below this now is activated and I'm seeing exactly what iscontained within the rule.

As a matter of fact, I am just going to sort of move this up a little bit so I can see more of these, because I want to talk about the different ways that we can view these properties.You'll notice at the bottom left-hand corner of the CSS Styles panel thatwe have three icons.The first one shows your Properties in Category view.Now, in a moment we are going to talk about defining new CSS rules using the CSS Rule Definition dialog box.Essentially what you're seeing is these properties grouped into categories,such as all the properties that might be associated with the Fonts or the Box Model or Lists.

So if you're looking for a specific property and you know which category it'sin, this is a very easy way to sort of sift through all of that and find exactlywhat you're looking for.Now, the next one is a List view of all the different CSS properties.You'll notice if I scroll through this, there are a lot of them. And to be quitehonest with you, this isn't quite all of them, but it's very, very close.So what about the ones up top?Well, anytime you see a property that's in blue and it's at the top of thisparticular type of view, those are the properties that have actually been set on this rule.

So the ones down below it that are in black are not set, but you have theoption of setting them.And then finally, we have the third view and this one is my favorite, and thisis the Show Only Applied Properties.This filters it out so the only thing you're looking at are theactual properties that have been applied to this rule and the valuesof those properties.What's nice about this is anytime you see a property listed in blue in thispanel, that means that you can click on that and you can change it.So if I wanted to change this say Margin value, I could just click on that andtype in the value I wanted for the margin, same thing for the text-indent, the top position of this, any of these properties that I want to modify I can.

I can also add more properties here as well.So if I were modifying my CSS Styles, and we'll do this a little bit later on, I could go ahead and continue to add all the properties that I want without everhaving to actually touch the code, which is nice.Now, I want to show off the Current View as well, but to do that we're going tohave to focus on an element on the page itself.So what I am going to do is I am going to click inside this paragraph right overhere, and then clicking on that I then want to focus on exactly the element thatI want to look at in terms of its styling.And to do that I am going to use the Tag Selector right down here on the bottom.I am going to click right there in the , that means a paragraph thathas the class of branding applied to it.

And once I click on that, it focuses on that.Now, the CSS Styles panel is going to pick up on the fact that I'm now focusedon a specific element on the page.So if I go over to the Current view, you'll notice that it's giving me the rulesfor this .Now, here this can be a little bit more confusing the first time you see this,so I want to talk about what these different panes are.First off, notice that it's pretty easy for me to resize these panes so that I have a little bit more room in one versus the other.So the top pane is a summary for this selection.

It's not really focused on how many rules or which rules are applied to it, but it's basically saying, okay, here is like the entire styling for this,everything all combined, this is what it is.So it's very easy for you to look through this and determine whether the properfont or the proper size is being applied to that, anything like this.Now, the second pane, this middle one right here, this is the one thatconfuses the most people.This is the cascade essentially, the rules.So these are all of the rules in your styles that are applying to this element.There are a lot of rules that have properties applied to them that are theninherited by their children.

Now, in this case the paragraph is obviously a child of the home header area or the body tag and the styles that are applied to that will also a lot of timesapply to the paragraph.And I can use this cascade rule to see if the selector that I wrote is applyingin the order that I wanted it in.For example, selector right here, basically that is an elementspecific class selector, and it's saying that anytime you find a paragraph with a class of branding, apply this style.That's a pretty specific selector, because of that it is the last rule applied,meaning its properties are going to overwrite any of the properties of theserules if there's a conflict between them.

So I can very quickly and easily tell if the rule is applying within the cascadein the order that I want it.The next pane we have here is the exact same pane that we have in the All view,which is just the Properties itself, and I can come in here and I can changethese properties and do whatever I want.Notice, for example, I can Add a Property. I am just going to go ahead and addone here, and I am going to add color.Now, I can grab this pull-down menu and choose color from that if I don't knowall of those properties or know exactly which property I am looking for or I can just type it in, either way.When I choose color, it also gives me the option of going ahead and grabbing thecolor picker and choosing a color that way, or if I want, I can highlight thevalue and I could type in anything that I want.

So I could even use a keyword notation in this case, which is white, and I'llstill get the same results.Now, as soon as I do a Save All and deselect this, you can see that, that colorhas now been applied to that rule.So it's a very quick and easy way to select an element on the page, flip rightover to the CSS Styles panel, see what type of formatting is being applied to it, and then modify that, again, without ever having to go into the code.I know it probably seems to you like we've covered a lot of ground with theCSS Styles panel, but to be honest, we have really only just scratched the surface of what it can do.

Don't worry, we are going to be using the CSS Styles panel throughout the restof the chapter, indeed as well as the rest of the title, which is going to giveyou plenty of time to familiarize yourself with these capabilities, as well asexploring some of its additional functionality.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Already a member ?

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships.
Learn more

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.