Techcss
Untitled Document

Styling border by CSS

To style the border of any block element by CSS we can set three values which are style, color and width.

To get effect of color or width value the primary essential matter is to set the value of border-style

We can use 'border:' attribute to set all the values in a single line code.

Example:

<div style="border:4px double #339966; width:300px">
This is an emoticon image which is generally used in chat room.<br />
<img src="image/carto.png" /></div>

Output:
This is an emoticon image which is generally used in chat room.

Border Style

We can set the border style property independently by using border-style:

Generally there are 10 values of border-style property which are:


Border Colour

You can set the color of a border independently with the 'border-color:' property and the values can be mentioned by color name or, hexadecimal number or, RGB color code or as transparent.


Styling the borders individually

We can set the borders individually by using