From the course: CSS Essential Training
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Project: Background image styles
From the course: CSS Essential Training
Project: Background image styles
- [Speaker] In this project update, we're gonna add a background image and color overlay to the header area. Let's add this style under the header section. We can also use header as the selector, since it's the only one on the page. In a later chapter, we'll go over how to size elements, but for now, let's add the height property to make the header area larger by setting it to 500 pixels. This will help us see the background styles more clearly. Later when we learn more about sizing, you'll have a chance to adjust this to fit your design preference. Next, we'll add the background image. It's usually recommended to use shorthand syntax where possible to write more efficient CSS. But for this exercise, I'll use the longhand syntax to clearly show each background style as we add it. Let's start by adding the background image property. Then we'll use the URL function to link to the image file. Relative paths are based on the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
The color property and value3m 55s
-
(Locked)
Creating a color palette2m 35s
-
(Locked)
Project: Defining custom properties3m 49s
-
(Locked)
The background property5m 30s
-
(Locked)
Using multiple background styles2m 47s
-
(Locked)
Project: Background and text colors6m 56s
-
(Locked)
Project: Background image styles6m 39s
-
(Locked)
-
-
-
-
-
-
-