Border Properties:-

The CSS border properties allow you to specify the style, width, and color of an element's border.

Border Style:- 

The border-style property specifies what kind of border to display. 
The following values are allowed:-
  1. dotted - Defines a dotted border
  2. dashed - Defines a dashed border
  3. solid - Defines a solid border
  4. double - Defines a double border
  5. groove - Defines a 3D grooved border. The effect depends on the border-color value
  6. ridge - Defines a 3D ridged border. The effect depends on the border-color value
  7. inset - Defines a 3D inset border. The effect depends on the border-color value
  8. outset - Defines a 3D outset border. The effect depends on the border-color value
  9. none - Defines no border
  10. hidden - Defines a hidden border
The border-style property can have from one to four values (for the top border, right border, bottom border, and the left border).

Example:- 

p.dotted {border-style: dotted;}
p.dashed {border-style: dashed;}
p.solid {border-style: solid;}
p.double {border-style: double;}
p.groove {border-style: groove;}
p.ridge {border-style: ridge;}
p.inset {border-style: inset;}
p.outset {border-style: outset;}
p.none {border-style: none;}
p.hidden {border-style: hidden;}
p.mix {border-style: dotted dashed solid double;}



Border Width:-

The border-width property specifies the width of the four borders.The width can be set as a specific size by using one of the three pre-defined values: thin, medium, or thick. 
The border-width property can have from one to four values (for the top border, right border, bottom border, and the left border).

Example:- 

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

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

p.three {
    border-style: solid;
    border-width: 2px 10px 4px 20px;
}

Border Color in CSS:-

The border-color property is used to set the color of the four borders.

The color can be set by:-
  1. name - specify a color name, like "red"
  2. Hex - specify a hex value, like "#ff0000"
  3. RGB - specify a RGB value, like "rgb(255,0,0)"
  4. transparent
The border-color property can have from one to four values (for the top border, right border, bottom border, and the left border). 
If border-color is not set, it inherits the color of the element.

Example:-
p.one {
    border-style: solid;
    border-color: red;
}

p.two {
    border-style: solid;
    border-color: green;
}

p.three {
    border-style: solid;
    border-color: red green blue yellow;
}



Rounded Borders in CSS:-

The border-radius property is used to add rounded borders to an element:-

All CSS Border Properties:-

borderSets all the border properties in one declaration
border-bottomSets all the bottom border properties in one declaration
border-bottom-colorSets the color of the bottom border
border-bottom-styleSets the style of the bottom border
border-bottom-widthSets the width of the bottom border
border-colorSets the color of the four borders
border-leftSets all the left border properties in one declaration
border-left-colorSets the color of the left border
border-left-styleSets the style of the left border
border-left-widthSets the width of the left border
border-radiusSets all the four border-*-radius properties for rounded corners
border-rightSets all the right border properties in one declaration
border-right-colorSets the color of the right border
border-right-styleSets the style of the right border
border-right-widthSets the width of the right border
border-styleSets the style of the four borders
border-topSets all the top border properties in one declaration
border-top-colorSets the color of the top border
border-top-styleSets the style of the top border
border-top-widthSets the width of the top border
border-widthSets the width of the four borders

IF you have any question about this lecture you can comment blow. feel free to contact me.
you can also Visit my YouTube channel by clicking on this Link YouTube Channel.

0 comments:

Post a Comment

Thanks

 
Blogger Templates1 school © 2013. All Rights Reserved. Powered by Blogger
Top