Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Continuing on making our CSS rules. Let's come over to the CSS panel in Dreamweaver. Let's create a new CSS rule. This is going to be a class, and this one is going to be marquee_caption_content. Choose OK. The settings inside of here, Box properties, we're going to set this to 410 pixels wide. For Padding, we're going to set 0 on the Top, Right, and Bottom, and 25 pixels on the Left. I can click Apply, and in the background, I can see that sort of scoot over into place.
Choose OK. Let's create a new rule. Let's create a compound rule here. The rule we're going to create is an h2 tag, but we want to make sure that it's only targeting h2 tags that are inside of the marquee. So we will choose marquee_caption, space, h2. That way if we have other h2 elements anywhere on the page, this rule will only affect them if they are inside of marquee_caption. Let's choose OK.
Now for the h2 tag Font-size, we're going to choose 1.25 ems. This will make this 25% larger then the base font that the browser or the device is representing. Font-weight, we're going to choose Normal. Text-transformation, we're going set to uppercase. Color we're going to set to white. Let's go to the Box properties. For Margin, let's turns off Same for all.
We're going to set 0 on the Top and Right, 12 pixels on the Bottom, 0 on the Left. Then click Apply. I can see the change over on the left. That looks good. Let's click OK. Now Dreamweaver has a nice little shortcut. If I come in here and get my cursor inside of an area within my page, so I can see down here I'm inside of the P tag inside of marquee_caption, if my cursor is inside a particular area and I come over to the CSS Rules and click a new rule and choose a compound path, Dreamweaver will automatically create this compound selection for me.
So I'm going to come in here and hit Less Specific until I get marquee_caption_content, space, p. So I'm targeting p tags that are inside of marquee_caption_content. Let's choose OK. Now, in here, I want to come into the Box properties. Let's go to Margin. I want to set 0 on the Top and Right, 12 on the Bottom, 0 on the Left. Let's go under Type > Color, choose white, click Apply. Let's choose OK.
Let's get my cursor inside of our 'Check it out' link here. I'll create a new rule, compound path, Less Specific. I am just going to take out the paragraph tag and just leave it as an anchor tag. So, any anchor tag inside of marquee_caption_content. Click OK. So, for color, let's come in here and choose a nice gold color for the link. Click Apply. Let's choose OK.
Let's create another new rule, Compound, Less Specific. Let's take out the P in that path and let's type ':hover'. Let's add at a pseudo-class to anchor tags inside of marquee_caption_content. Choose OK. This is going to control what the link looks like when we roll over it. Let's come down to Color and let's just choose white. Click OK. So in Design view, let me click to the side. Let's scroll down. We can see the layout coming into place.
We want to do one more. Let's come in and create our marquee flag rule. So I'm going to click on the flag. Create a new rule. Let's make this Less Specific. So now we have marquee_flag inside of marquee_caption_content. Let's click OK. The properties inside of here, Box properties. Let's come down to Float and choose Float left. Let's come down to Margin and from Margin Right, we're going to choose 10 pixels. Then click Apply.
Then say OK. Let's go into our page. I'll just click to unselect to the flag. Now we can see our flag floats over to the left, and we have our H2 up next to that. Then we have "This is a caption" inside of the p tag and then our paragraph tag after that with the anchor tag inside of it. Let's save all of our work so far under File > Save All, and then in the next movie, we'll continue on.
Get unlimited access to all courses for just $25/month.Become a member
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.
Your file was successfully uploaded.