Style borderLeftWidth attribute
- Pagina precedente borderLeftStyle
- Pagina successiva borderRadius
- Torna alla pagina superiore Oggetto Style HTML DOM
Definition and usage
borderLeftWidth
Sets or returns the width of the element's left border.
See also:
CSS Tutorial:Bordo CSS
CSS Reference Manual:border-left-width attribute
HTML DOM Reference Manual:border attribute
Example
Example 1
Change the left border width of the <div> element to 10px:
document.getElementById("myDiv").style.borderLeftWidth = "10px";
Example 2
Change the left border width of the <div> element to thin:
document.getElementById("myDiv").style.borderLeftWidth = "thin";
Example 3
Return the width of the left border of the <div> element:
alert(document.getElementById("myDiv").style.borderLeftWidth);
Syntax
Return borderLeftWidth attribute:
object.style.borderLeftWidth
Set borderLeftWidth attribute:
object.style.borderLeftWidth = "thin|medium|thick|length|initial|inherit"
Attribute value
Value | Description |
---|---|
thin | Define thin border. |
medium | Define medium border. Default. |
thick | Define 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 that represents the width of the element's left border. |
CSS version: | CSS1 |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supporto | Supporto | Supporto | Supporto | Supporto |
- Pagina precedente borderLeftStyle
- Pagina successiva borderRadius
- Torna alla pagina superiore Oggetto Style HTML DOM