Download
    Interview Question     &Answer
Main Menu
CSS Border@ Shwetank education.com
Definition -  CSS Border, our personal favorite CSS attribute, allow you to completely customize the borders that appear around HTML elements.

• CSS Border Style
• CSS Border Width
• CSS Border Color
• CSS Border Direction
• CSS Border
CSS Border Style
Example
<html>
<head>
<style type="text/css">
p.none {border-style:none;}
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.hidden {border-style:hidden;}
</style>
</head>
<body>
<p class="none">No border.</p>
<p class="dotted">A dotted border.</p>
<p class="dashed">A dashed border.</p>
<p class="solid">A solid border.</p>
<p class="double">A double border.</p>
<p class="groove">A groove border.</p>
<p class="ridge">A ridge border.</p>
<p class="inset">An inset border.</p>
<p class="outset">An outset border.</p>
<p class="hidden">A hidden border.</p>
</body>
</html>
Output

No border.

A dotted border.

A dashed border.

A solid border.

A double border.

A groove border.

A ridge border.

An inset border.

An outset border.


CSS Border Width
The border-width property is used to set the width of the border.
Example
<style type="text/css">
table { border-width: 5px;
border-style: outset; }
td { border-width: medium;
border-style: outset; }
</style>
CSS Border Color
The border-color property is used to set the color of the border.
Example
<style type="text/css">
table { border-color: rgb( 50, 50, 200);
border-style: dotted; }
td { border-color: #0066CC;
border-style: double; }
p { border-color: lime;
border-style: ridged; }
</style>
CSS Border Direction
If you would like to place a border on only one side of an HTML element, or maybe have a unique look for each side of the border, then use border-(direction). The direction choices are of course: top, right, bottom, and left.
Example
<style type="text/css">
p { border-bottom-style: grooved ;
border-bottom-color: lime;
border-bottom-width: 5px; }
div { border-top-style: double;
border-left-style: double;
border-right-style: double;
</div>
</style>


IT  Projects Links
M-Tech Thesis
Php Project
Java Project
Asp.Net Project
Android Project
Vb .Net Project
Html Project

------------------------------- Electronics  Project
Networking
Embedded system
Telecom
Robotics
CCNA
------------------------------- Latest IT  News


Copyright 2010-2015    shwetankeducation.com
Privacy & Terms