The word "Division" derived from the word "Parts". This means that you can make as many parts as you want to show different elements on your website with the help of style sheet.
You can use almost every bit of your website page's space.
In my previous chapters, you have learnt about the syntax or properties of css.
Now it is time to learn about how to use in HTML coding. It starts with DIV tag in HTML and you can reserve space of a website page with as many DIV tag as you want with the help of style sheet.
To create above layout; use the coding as shown below:-
Example of CSS CODING
/* Here I am using for CSS IDs to create Main Screen, Left, Center and Right Division*/
#main
{
width:425px;
height:261px;
background-color:blue;
border:20px solid brown;
}
#left
{
height:116px;
width:130px;
background-color:#FFFFFF;
border:2px solid red;
border-radius:20px 20px 0px 0px;
float:left;
border-bottom:50px solid red;
}
#right
{
height:116px;
width:130px;
background-color:#FFFFFF;
border:2px solid green;
border-radius:20px 20px 0px 0px;
float:right;
border-bottom:50px solid green;
}
#center
{
height:116px;
width:130px;
background-color:#FFFFFF;
border:2px solid pink;
border-radius:20px 20px 0px 0px;
margin-left:10px;
float:left;
border-bottom:50px solid pink;
}
#main
{
width:425px;
height:261px;
background-color:blue;
border:20px solid brown;
}
#left
{
height:116px;
width:130px;
background-color:#FFFFFF;
border:2px solid red;
border-radius:20px 20px 0px 0px;
float:left;
border-bottom:50px solid red;
}
#right
{
height:116px;
width:130px;
background-color:#FFFFFF;
border:2px solid green;
border-radius:20px 20px 0px 0px;
float:right;
border-bottom:50px solid green;
}
#center
{
height:116px;
width:130px;
background-color:#FFFFFF;
border:2px solid pink;
border-radius:20px 20px 0px 0px;
margin-left:10px;
float:left;
border-bottom:50px solid pink;
}
Now have a look on the HTML coding to make divisions.
Now I hope everything is clear to you with respect to Division in CSS.
Example of CSS CODING
/* Here I am using DIV Tag of HTML to make Divisions on the page*/
<div id="main">
<div id="left"></div>
<div id="center"></div>
<div id="right"></div>
</div>
<div id="main">
<div id="left"></div>
<div id="center"></div>
<div id="right"></div>
</div>
Now I hope everything is clear to you with respect to Division in CSS.
For more examples on CSS based layout and the use of all CSS attributes and properties; see blog posts.
And share your feed back.
0 comments:
Post a Comment