Borders on Specific Side

You can also set only a specific border property (style
, color,
or width
) for a specific side (top
, right
, bottom
, or left
) of borders using the property formula below.

Practice
Objective:
Set a specific property value for a specific side of the borders
1. Update the body section of the HTML file
Add the code below in the body section of the chapter13.html file. We are using bg-border
class that has already been defined before.
In the code below, we are wrapping each set of object groups using the <div>
element with the display
and flex-wrap
properties to structure the results. We'll explain these properties in detail later. For now, just copy and paste the code.
This time, we are using a nesting structure to show the result as a column structure.
2. Check the result with a browser
- Open chapter13.html with a browser.
- You can see how to adjust a specific border property for a particular border.
You can also check the sample result here (Demo Site).