From the course: CSS Fundamentals: Unlock the Power of Web Styling
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Applying borders and backgrounds - CSS Tutorial
From the course: CSS Fundamentals: Unlock the Power of Web Styling
Applying borders and backgrounds
- [Instructor] In this lesson, I'd like to talk with you about borders and backgrounds. And we'll start with borders. The CSS border properties allow you to specify the style, width, and color of an element's border. Similar to margins and paddings, borders can be defined from the top, right, bottom, and left sides individually. Borders syntax can get really wordy if you're specifying the style, width, and color individually. That's why I recommend going with the shorthand notation. This lets you set all three border properties at the same time for each individual side. Now, if all four sides are going to be identical, you can actually condense this shorthand further and just simply say border and then give it the properties that you want. One important thing to remember about borders and that's that they do affect the overall width of an element. Border widths begin at the edge of padding widths and then extend…
Contents
-
-
-
-
Why CSS reset and normalize matter2m 56s
-
(Locked)
Working with fonts4m 45s
-
(Locked)
Understanding the box model4m 12s
-
(Locked)
Setting margins and padding3m 39s
-
(Locked)
Working with color6m 15s
-
(Locked)
Applying borders and backgrounds4m 56s
-
(Locked)
Understanding the units of measurement3m 6s
-
-
-
-
-