Style borderLeftWidth property
- Forrige side borderLeftStyle
- Næste side borderRadius
- Gå tilbage til niveauet over HTML DOM Style Object
Definition and usage
borderLeftWidth
Sets or returns the width of the element's left border.
See also:
CSS Tutorial:CSS kant
CSS Reference Manual:border-left-width property
HTML DOM Reference Manual:border property
Example
Example 1
Changes the left border width of the <div> element to 10px:
document.getElementById("myDiv").style.borderLeftWidth = "10px";
Example 2
Changes the left border width of the <div> element to thin:
document.getElementById("myDiv").style.borderLeftWidth = "thin";
Example 3
Returns the width of the left border of the <div> element:
alert(document.getElementById("myDiv").style.borderLeftWidth);
Syntax
Returns the borderLeftWidth property:
object.style.borderLeftWidth
Sets the borderLeftWidth property:
object.style.borderLeftWidth = "thin|medium|thick|length|initial|inherit"
Attribute value
Value | Description |
---|---|
thin | Defines thin border. |
medium | Defines medium border. Default. |
thick | Defines thick border. |
length | Border width in length units. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | medium |
---|---|
Return value: | A string representing the width of the element's left border. |
CSS version: | CSS1 |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Støtte | Støtte | Støtte | Støtte | Støtte |
- Forrige side borderLeftStyle
- Næste side borderRadius
- Gå tilbage til niveauet over HTML DOM Style Object