From the course: CSS: Enhancing Website Graphics

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use the border style

Use the border style - CSS Tutorial

From the course: CSS: Enhancing Website Graphics

Start my 1-month free trial

Use the border style

- [Instructor] In this chapter we'll learn different ways of adding borders to any page element. Let's start with the CSS border property. One of the oldest and simplest ways of creating an element border. Let's first review the basic layout of any block element. The layout consists of the content box, which contains the content of the page element. Surrounded by the padding box, which is the empty space around the content, and finally, the border box. Which marks the furthest extent of the element and then closes the border space. It is the border space that will be the focus of this chapter. The element border can be defined using the border shortcut property, which has the following values. Width. We set the width of the border using one of the CSS units of measure. Color. To set the color of the border. And style. To define the style or appearance of the border. This demo page shows how varying these values can effect the appearance of the element border. Let's first increase the…

Contents