Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Customizing the style

From: Creating a First Web Site with Dreamweaver CS6

Video: Customizing the style

As you start to add content to your HTML page, you're going to want to start controlling all the visual aspects of it, and luckily you can do that with cascading style sheets. Well, what are those? Well, they're a style sheet language used to describe the design of an HTML document. Also just called CSS, and with this CSS you can control all these visual aspects of the content, and you can actually have it separate, because the CSS can separate the content from the design. Take for instance an HTML page, you might have the content at the bottom and all the CSS will exist at the top, and that will control all the visual aspects of that HTML page.

Customizing the style

As you start to add content to your HTML page, you're going to want to start controlling all the visual aspects of it, and luckily you can do that with cascading style sheets. Well, what are those? Well, they're a style sheet language used to describe the design of an HTML document. Also just called CSS, and with this CSS you can control all these visual aspects of the content, and you can actually have it separate, because the CSS can separate the content from the design. Take for instance an HTML page, you might have the content at the bottom and all the CSS will exist at the top, and that will control all the visual aspects of that HTML page.

But know you can also have those CSS styles external from the HTML page, so you have the external page that you can work on, and it will affect that HTML page that is linking to it. Taking that a step further, you can have that one CSS page, and it could actually affect many different HTML pages, so you can have one CSS file that all the HTML pages are pointing to that affects the entire site. That's great, because I only have to update my CSS in one place, so it's going to be more consistent as well, as well as smaller in file size, because I only have that one reference to the design. Well, what does this CSS look like? Well, it basically consists of a selector and declarations, so these are your CSS rules as they're known, because you have your selector, known as the paragraph tag, in this case the P element, and the declarations, which are basically a property and value combo. So you have your selector and then your declarations.

Now whenever these selectors are used, those declarations will be applied. So, in the context of an HTML page, you might have the paragraph, tags, and when those CSS rules are applied, those properties are applied to that text wherever the paragraph tags are being used. Luckily, Dreamweaver makes styling CSS and using CSS and modifying CSS really easy. In fact, they don't to worry about necessarily dealing with the CSS code, because there are also handy panels that will do a lot of this for me, enabling me to just pick a color if I want to pick a color. Dreamweaver makes this really easy.

So let's go ahead and dive into Dreamweaver now. Here I am in Dreamweaver, I have my web page open, and it's looking pretty good so far, but I really want to tighten this up, and I want more control. And you actually have that control with CSS. In fact, as I take a look, check this out, I don't like how that text runs clear up to the edge of that box. Another thing I like to take a look at doing is maybe making that black semi-transparent. Or what about rounding the corners? Again, a popular thing to do these days.

Also what about adding say a drop shadow to this text, can I do that? And will it require a graphic? Well, no. You can do all of this with CSS. And that's what you'll do, you'll select this, and you'll start to look in the Properties panel and realize that you don't see any of those options down here, okay? So we need to go beyond this Properties panel. In fact, if we go into the CSS Styles panel, select All, this happens to be my section. Okay, this is my section selector, my selector tag, and as I take a look right down here, well, here is all the properties that I currently have added, which are also shown here, but if I just double-click on it--or you can always hit this button right down here for editing that rule, just double-click on it-- now you get the CSS Rule definition for this section.

This is great. I can jump in here to the background, maybe to the box. Okay, this is good. I'm looking in here for this box. That's exactly what it is. I can add padding to it. So, let's add padding of 5 pixels all the way around. Clicking Apply, it adds that padding. Nice, I like that. I can take a look at adding a border, maybe changing the position, all sorts of things, but another thing I mentioned was changing the background to be semi-transparent.

So, you might look in here and take a look at all these various colors that you can select, and really what I want to do is I want to go beyond these colors by selecting the flyout menu here, changing the Color Format from the Six-digit Hex colors to red, green, blue, Alpha. Ooh! Alpha is going to be transparency. So will HSLA. So, selecting that RGBA, now look when I select any one of these colors, I get that RGBA, that last number, that number 1, I can change to .5 to make it 50%.

So again, that's that last digit right here, doing it .5, that's going to make that 50%. I'll click Apply. You can see that it made it 50%. All right so that's a little too transparent. I am going to change that to about .8, which is 80%, clicking Apply, and there we have that, that looks good. All right, so far so good. I'm going to save this page. In fact, I can select the Live view, and you can see it in action. It's looking a lot better, but again, I want to round these corners now. Sounds like a great idea.

All right, so, going into that particular item, I can take a look if I double-click on that, I can start to look for it in here, and really there are so many CSS, especially CSS3 properties available these days, it's just going to fill up all of this entire panel. So, what you can do is if I hit Cancel, I can add a property down here. So check this out, adding a property, clicking, oh, look at all of these CSS properties.

Now it's just a few of them, not that many, but you can see this long list, okay. What I want to do is I want to change the border radius. So coming in here, I can select border-radius. Now watch what happens when I select border-radius. Rather than having to type in some numeric values, I get this widget, so I can click Edit. Well, look at this corner radius, I can change that to say 20, okay.

And in fact, if I go to Live view, you can see it already implements that. So again, border-radius was what I was dealing with. Going back in there, I have Live view selected, I can start to not only change it from 20 each side, what if I wanted to do 30, I can see as I type that in, it will actually change it to 30. Let's turn off Same for all and manipulate the Top Left and Bottom Right to be right angles, hitting Enter, and I really like the shape, sharp point there, and then it's going to be kind of hard to see, but down here there is a sharp point there as well.

I love this sort of control, doesn't require graphics, I'm doing it all with CSS. The last thing I want to do is add a text shadow to this element. Now remember this is my h1, okay, so it's turning off that Live view. This happens to be my h1. So for that h1, I can add that property for that text shadow. Again, this panel is going to give you the most robust control, so text-shadow is what I want to select, text-shadow and what I want to do from there is again, use that widget to define the offset of about 5, X and Y, Blur-radius about 5, and let's make that Color, I can change that to black just like that.

Now you don't see it, well, turn on Live view, and you can see there it is. Pops off just fine, and I can even manipulate that some more. Just keep in mind this is the h1, so coming in here I can always change that any way I want, and not only can I change the color, but I can even make it semi-transparent, say .5, hit Enter, and you can see that made it a lot softer. It really makes that kind of pop off the page, which I really like that. So, feel free to play with those numbers, I'll change the Blur-radius to about 10.

I'm liking that more, and in fact, that's what I think I'll leave it at. All in all, the text is going to be more on this side, but I'd say that looks great. Really, with a lot of control I'm able to control the visual elements of this page, everything from the box elements, any of these tags, I can either do that by editing the properties, by clicking on them this way, or even adding the property down here, all with CSS and specific CSS3 properties available.

Show transcript

This video is part of

Image for Creating a First Web Site with Dreamweaver CS6
Creating a First Web Site with Dreamweaver CS6

30 video lessons · 40199 viewers

Paul Trani
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

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.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Creating a First Web Site with Dreamweaver CS6.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

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

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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:

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:

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

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.