From the course: Creating a Responsive Web Design

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Styling the heading and page container

Styling the heading and page container - CSS Tutorial

From the course: Creating a Responsive Web Design

Styling the heading and page container

- Now we're going to add some CSS rules to style the elements inside of the header area. So in our CSS file, let's hit a few Returns. I'll add another CSS comment here. Call this Header. Then the first item we're going to target is going to be the header element, so I'll type header, put in our brackets. Now the first property we're going to set is going to be a height, so I'll set height to 430px. Then a space, next we'll set background properties. We use shorthand style for this, so the first property is going to be the background color, then the image, then the repeat properties, and then the positioning properties. So for the color, we're going to use a dark red, so that's going to be #cf for red, 00 for green, 04 for blue, then a space, url(). We're going to point to the banner_1200.jpg file. So ../ to come out of the CSS directory because our CSS file up here is inside of a folder called CSS. So ../ brings us out to the root, then back into images/ then banner_1200.jpg. Then…

Contents