To create lines in CSS, you can use the border
property. For example, to create a horizontal line you could use:
.horizontal-line {
border-top: 1px solid black;
}
To create a vertical line, you can use the border-left
property:
.vertical-line {
border-left: 1px solid black;
}
You can adjust the width, color, and style of the line using different values for the border
properties.
Alternatively, you can use the ::before
or ::after
pseudo-elements with the content
property set to an empty string, and then use the border
property on the pseudo-element to create lines. For example, to create a horizontal line with the ::before
pseudo-element:
.horizontal-line::before {
content: '';
display: block;
border-top: 1px solid black;
}
I hope this helps!