CSS - border-left Property
Sets an element's left border; value is one or more of a color, a value for border-left-width, and a value for border-style.
Possible Values
Possible values are:
one or more of a color border-left-color
a value for border-width border-left-width
a value for border-style border-left-style
Applies to
All the HTML elements.
DOM Syntax
object.style.borderLeft = "2px solid red";
Example
The border-left property allows you to specify color, style, and width of left lines in one property. Following example demonstrates this:
<html> <head> <style> p.example1{ height:50px; border-left: blue 15px solid ; } p.example2{ height:50px; border-left: red 15px dashed; } p.example3{ height:50px; border-left: green 15px groove; } </style> </head> <body> <p class="example1">Check the left border!!!</p> <p class="example2">Check the left border!!!</p> <p class="example3">Check the left border!!!</p> </body> </html>
Advertisements
To Continue Learning Please Login
Login with Google