CSS Border

These are some of the commonly used CSS properties related to borders:

border-style: this property sets the style of the border, such as solid, dotted, dashed, or none. For example, "border-style: solid;" will create a solid border.

border-width: this property sets the width of the border. For example, "border-width: 2px;" will create a border with a width of 2 pixels.

border-color: this property sets the color of the border. For example, "border-color: red;" will create a border with a red color.

border-radius: this property sets the roundedness of the corners of the border. For example, "border-radius: 5px;" will create a border with rounded corners of 5 pixels.

border-top, border-right, border-bottom, and border-left: these properties allows you to set the individual borders of each side of an element. For example, "border-left: 1px solid black;" will create a black solid border on the left side of an element.

box-shadow: this property creates a shadow effect around the border of an element. For example, "box-shadow: 2px 2px 5px gray;" will create a gray shadow effect 2 pixels to the right and 2 pixels below the border, with a blur radius of 5 pixels.

These are just a few of the CSS properties related to borders. There are many others, such as border-image and border-collapse, which can be used to further customize the appearance of borders on a web page.

Last updated