CSS - border-right



Sets an element's right border; value is one or more of a color, a value for border-right-width and a value for border-style.

Possible Values

Possible values are:

Applies to

All the HTML elements.

DOM Syntax

object.style.borderRight = "2px solid red";

Example

The border-right property allows you to specify color, style, and width of right lines in one property. Following example demonstrates this:

  <html>
  <head>
     <style>
        p.example1{
           height:50px;
           border-right: blue 15px solid ;
           }
        p.example2{
          height:50px;
          border-right: red 15px dashed;
          }
        p.example3{
           height:50px;
           border-right: green 15px groove;
           }
     </style>
  </head>
  <body>
        <p class="example1">Check the right border!!!</p>
        <p class="example2">Check the right border!!!</p>
        <p class="example3">Check the right border!!!</p>
  </body>
  </html>
Advertisements