Loading Please Wait...
CSS allow us to handle border of the elements. We can set color, image, size, etc. of the border. CSS has border or border-* properties for the border.
Sets the border width of the selected element.
We can use any length value such as px, in, cm, rem, etc. and thick, thin keyword value as well.
Syntax = border-width: 1px;
p{
border-width: thin;
}
Sets the border color of the selected element.
We can give any color value like name, HEX, HEXA, RGB, RGBA, HSL, HSLA, etc.
Syntax = border-color: red;
p{
border-color: red;
}
Sets the style of the border of the selected element.
Syntax = border-style: solid;
div{
border-style: double;
}
Sets the roundness of the border of the selected element.
Syntax = border-radius: 10px;
div{
border-radius: 0.5rem;
}
We can set individual side of the border such as top, bottom, left, end, etc.
Syntax = border-top: 10px;
div{
border-end-end-radius: 0.5rem;
}
Sets the border image of the selected element.
Syntax = border-image: url("image.png");
div{
border-image: url("image.png");
}
Sets the top and bottom border.
Syntax = border-block: red;
div{
border-block: 0.5rem;
}
Sets the left and right border.
Syntax = border-inline: red;
div{
border-inline: 0.5rem;
}
Sets whether the border of the cell inside HTML <table> element should overlap with each other or be separated.
Syntax = border-collapse: collapse;
div{
border-collapse: separate;
}
Sets the spacing between borders of the cell inside HTML <table> element.
Syntax = border-spacing: 0;
div{
border-spacing: 1em;
}
Sets the border properties in a single line.
Syntax = border: 5px solid red;
div{
border: dashed blue 0.5rem;
}
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved