Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
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.
The style header can be useful for many things, not the least of which is to explain your site's color and typographic strategy. In this movie, we'll explore adding a style color guide to our header, and discuss how this can be extremely useful when creating your styles. So, I have the main.css. As you can see, currently, it just has our sort of generic style header that we created in the previous movie. Well, right down below that, I'm going to add our color guide. So, I want to put my cursor on the line just below the existing header.
I'm just going to type a few hyphens intact as a separator, and then type in color guide, and then finish out those hyphens, just so it's really easy to break that up in a section. And this is a structure that we're going to follow really for the rest of our CSS file. Okay! On the line below that, I'm going to type in my first color. I'm going type in #193742, and then just after that, I'm going type in a space and a colon, just to act as another separator.
Then after that, I'm going to type in dark blue. Right after dark blue, I'm going to type in a pipe character, and you could find that just to the right of your bracket keys. Then I'm going to type in a little bit of a description here, a little brief description. I'm going to type in use for main headers and most paragraph level headings. Okay! Now, let's take a moment to review the structure that we're setting up for our color guide here. So, we start, obviously, with a hexadecimal notation, and after that, we have sort of a name for the color.
Here, it's dark blue. Really, it could be anything that you want it to be, anything that's going to sort of identify who this color is: dark blue, light blue, steel. After that, we have a brief description of the color itself. That again, is to sort of trigger your own memory as to when you're going to be using this color. Now, you are free to really structure this anyway that you want. When you're working in a team environment, it's a really good idea to put sort of a description about this color, when it should be used and any sort of rules you have around governing usage of that color.
If you're just making yourself a color guide, so that you could go back and remind yourself what a hexadecimal value is for a specific color, you probably don't need this. Anytime that you're working in a team environment, or if you just want to remind yourself of the rules in your site, this is a really good practice to do. Now, above and beyond just giving us something to remember, the really cool thing about this is that if I'm creating a rule, I can come in, simply highlight the hexadecimal value, copy it, and then paste it into the rule further down the page. So, it becomes sort of a way of me almost having my own little set of swatches right here when I'm going to be hand-coding. All right! I'm going to go down the next line, and we just have a few more colors that we want to go ahead and throw in here.
Keep in mind we're going to follow this structure every single time, so that we're consistent. So, down below that is #e1d8b9. So we type in a colon, and after that we're going to type in sand accent, and then another pipe character, and we're going to say use for most area background colors. On the line after that, we're going to type in #cb7d20, again, a space and a colon.
Limit the space there, so that if you're highlighting this text to copy and paste it, you don't have to worry about selecting a colon, also by mistake, which would be a problem in most rules. Then we're going to do orange accent. Again, we're going to do another separator here, which is reusing our pipe, use for links & rollovers. Right after that, we're going to type in #51341a. We'll type in our colon. After that, we're going to type in brown, a little pipe character there, and then we're going to say use for secondary headers.
Then after that, we're going to type in #952. So, again, here, we're using a little bit of shorthand notation - more on that in just a moment. We're going to type in a colon there and say dark orange. Then we're going to type in use for links or high contrast accents. Create another line, and two more colors to go. So, #3c6b92. That's going to be a main blue, and again, type in your pipe separator, use for page background, footer background.
Then finally, our last color, #333, our colon separator and neutral gray, and then finally, use for body copy. All right! Now, I need to go ahead and make sure that this is commented out. So, what I'm going to do is highlight all of the text that we just typed in, go to my Coding toolbar here and choose to apply the CSS multiline comment, right there. When I click off of it, I can see that it's gray, so that lets me know that, indeed, it is now commented out. Browsers will ignore this code when we render it. Okay! So, did we use all the colors on our site? Well, yeah, for the most part, we did.
But how many colors you put in your color guide, How they're structured and what order they come into is entirely up to you. You just want to make sure that you're passing along information clearly to yourself for a later date, and any team members, and perhaps freelancers in the future that might be working on this site, as well. So, a color guide is going to be extremely useful for us. It's going to allow us to quickly, say, copy and paste hex values when we create new styles. It's serving as a basic color usage guide for other team members, and that's very important.
Now, as with any information you add to your styles, you are free to add as much or as little information as you want. Think about ways you can use creatively use a color guide within your style sheets. I think you'll find it speeds up the creation of your styles, and serves as a handy reference within your code.
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.