CSS Border

Border Color :

The border-color property can be used setting along with of the border. The colour could be set by:

  • title – specify a color title, like “blue”
  • RGB – specify a RGB value, like “rgb(255,0,0)”
  • Hex – specify a hex value, like “#ff0000”

You can also set the border shade to “transparent “.

Example :

p.one
{
border-style:solid;
border-color:blue;
}
p.two
{
border-style:solid;
border-color:#98bf21;
}

Border Width :

The border-width property is employed to set the width of the border.
The width is defined in pixels, or by using among the three pre-defined values: thin, medium, or thick.

Example :

p.one
{
border-style:solid;
border-width:5px;
}
p.two
{
border-style:solid;
border-width:medium;
}

Border – Individual sides :

In CSS it is probable to establish various borders for various factors:

Example :

p
{
border-top-style:dotted;
border-right-style:solid;
border-bottom-style:dotted;
border-left-style:solid;
}

The border-style home can have from someone to four values.

  • border-style:dotted solid double dashed;
    • top line is dotted
    • right line is solid
    • bottom line is dual
    • remaining line is dashed
  • border-style:dotted solid double ;
    • top line is dotted
    • right and remaining edges are solid
    • bottom line is dual
  • border-style:dotted solid;
    • top and bottom edges are dotted
    • right and remaining edges are solid
  • border-style:dotted;
    • all four edges are dotted

The border-style home is used in the case above. But, in addition, it works with border-width and border-color.

Posted in CSS

Leave a Reply

Your email address will not be published. Required fields are marked *