Hi,
what is the shorthand for border when borders have different width?
I tried this:
border:1px solid black, 2px solid black, 3px solid black, 4px solid black;
and this:
border:1px 2px 3px 4px, solid, solid, solid, solid, black, black, black, black;
but none of them work.
Thank you.
CSS Shorthand Border Property To shorten the code, it is also possible to specify all the individual border properties in one property. The border property is a shorthand property for the following individual border properties: border-width. border-style (required)
Introduction to CSS Multiple Borders. Multiple borders in CSS can be done by box-shadow property. Generally, we can get a single border with border property. Box-shadow property is not for multiple borders, but still, we are creating multiple borders with box-shadow property.
There are mainly three border properties: The border-style :- Specifies whether a border should be solid, dashed line, double line, or one of the other possible values. The border-color :- Specifies the color of a border. The border-width :- Specifies the width of a border.
Use
border: solid black;
border-width: 1px 2px 3px 4px;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With