Skip to content
Examples: border-width: thin medium thick 10px; top border is thin; right border is medium If you'd like to contribute to the interactive examples project, please clone This property is a shorthand for the following CSS properties:Get the latest and greatest from MDN delivered straight to your inbox.The newsletter is offered in English only at the moment. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. : hidden div { border-width: 1px 2px 1px 2px; border-style: solid; border-color: black red black red; } Usare la proprietà CSS border. The CSS Border property allows you to customize the borders around an HTML elements. The effect depends on the border-color value: Play it » ridge: Specifies a 3D ridged border. The default border-style is none, so you must specify that as well as the width and the colour.. You can use the border shorthand property to set all three values in one go.. Also, the border attribute describes the border for the table and the cells. top rounded border with solid rainbow color stops (without inserting html). 4. border-right-colorchanges the color of right border. I need to create a solid color inset border. The effect depends on the border-color value.An outset border. Specifies a dashed border: Play it » solid: Specifies a solid border: Play it » double: Specifies a double border: Play it » groove: Specifies a 3D grooved border. While setting the border width one thing should kept in mind that this property will not work if used alone, for that we need to set the border first.This example will help you how to set the border width.We can set the different border widths on four side of an element.The border-color property is used to give colors to the border.
CSS Level 1 The definition of 'border-width' in that specification. This property can have from one to four values.
We can set different individual border on the four sides of an element.The border-width property helps you to set the width of the border. The effect depends on the border-color value; ridge - Defines a 3D ridged border. You can set the thickness or width, color and style of each border.This border-style property defines the type of border to display. Recommendation: Initial definition. CSS Border Style. Like the hidden keyword, displays no border.
I used the direct input validator with the following CSS code, .test { border: 1px solid rgba(255, 0, 0, .5); } The results were, border-left-width, which defines the width of an element’s left border. W3Schools is optimized for learning, testing, and training. Recommendation: Added the constraint that values' meaning must be constant inside a document. CSS Border Width. The effect depends on the border-color value.A ridge border. The numbers in the table specify the first browser version that fully supports the property.Set the width of the top and bottom borders to 10px, and the width of the left and right borders to 1px:If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:
border-width: Specifies the width of the border. Colors are: #c4e17f. To make them different from each other, however, you can use the longhand border-width, border-style, and border-color properties, which accept different values for each side. Unless a background-image is set, the computed value of the same side's border-width will be 0, even if the specified value is something else.In the case of table cell and border collapsing, the none value has the lowest priority: if any other conflicting border is set, it will be displayed. Below given is the syntax for the type of styles that can be used:Following is the example showing some of the above mentioned border styles. The following example shows the effect of all these properties − It will produce the … CSS File: style.css The effect depends on the border-color value.If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:
Sign in to enjoy the benefits of an MDN account. While using this site, you agree to have read and accepted our It is a shorthand property which specifies: border-top-width, which defines the width of an element’s top border. A groove border. Border Width Example: This example will help you how to set the border width.We can set the different border widths on four side of an element. The following values are allowed: dotted - Defines a dotted border; dashed - Defines a dashed border; solid - Defines a solid border; double - Defines a double border; groove - Defines a 3D grooved border.
Definition and Usage. CSS File: style.css