H I O X INDIA
FREE CSS Tutorial
Google
Web hscripts.com
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

CSS Topics
Introduction
Types
Background Properties
Text Properties
Font Properties
BOX Properties
Border Properties
Margin Properties
Padding Properties
Special Topics
Ask Your Doubts
Feedback





CSS Borders


Topic

Handling borders... !



Explanation

Property: Borders

Instead of setting each side of borders separately, the whole thing can be done using the single tag Usage:
border: <border-width> || <border-style> || <border-color> ;

Definition:
This will set the border to any object.
a)border : 5px dotted green - The border is set using the tag border. The values or in the order width, style and color of border.
This set the border on all the four sides.

Example 1:
<div style=" border : 2px dotted red ;"> testing border properties </div>

Result:
testing border properties



NOTE: In the example we have used div tag.
But you can use any standard html tags to set the style.


Common Border on Three Sides and Different border in one side:
In some cases we will have common border for two are three sides and different border in only one side. This can be easily handled as follows

Example 2:
<div style="
border : 2px dotted red ;
border-top: 3px dashed green;
">
testing border properties </div>

Result:
testing border properties



Definition:
Initially we set the common border for all sides using border attribute and then we set/change the top border using "border-top".






A Note
CSS - Cascading Style Sheets can be used along with html tags as explained in this site. This simple CSS will help you to create much elegant and neat html web pages. This does not need any additional softwares or codings. All web browser are capable of handing CSS codes.

Note 2: If required you can using <span> instead of <div> tags. div tag will start and end on new lines. span will not exceed the tag area.


privacy policy     license     sitemap
© 2004-2005 HIOX INDIA - hioxindia.com