Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Hi,

I want a very small page coding for div nested tags.
Through that I could be master of designing web page using css and div tags instead of table!

Please help me
Posted
Updated 28-Oct-10 10:55am
v2
Comments
Dalek Dave 28-Oct-10 16:55pm    
Edited for Grammar and Readability.

If you want to use divs and CSS for layout, look at the samples here:

http://glish.com/css/[^]
 
Share this answer
 
Some thing like this?

XML
<div class="bodyclass">
<div class="header">
A Header for the page
<div class="navigation">
The Navigation bar stuff
</div>
</div>
</div>


Just set the css page items to your requirements.
Here is an example...

htm
.bodyclass
{
    margin-left:auto;
    margin-right:auto;
    width:1024px;
    height:900px;
}
.header
{
    margin-left:auto;
    margin-right:auto;
    width:1024px;
    height:100px;
    background-color:rgb(41,110,43);
    padding-top:5px;
    font-size:72px;
    text-align:center;
    color:rgb(204,245,100)
}
.navigation
{
    background-color:rgb(204,245,100);
    width:1024px;
    height:27px;
    font-family:Andalus;
    font-size:medium;
    color:Maroon;
}
 
Share this answer
 
You're right - mastering DIV elements, combined with CSS, will make you a master of web pages, but to reach the next level you have to master Master Pages to really reach the peak of perfection.

Dave's answer provides some excellent examples of applying this technique to individual pages, but for a truly professional look, all pages on a site should have a similar look and feel, except where the functionality of specific pages precludes consistency. Master pages allow you to use your CSS and DIV skills to create one or more templates for layouts and style, then embed them in individual pages. Since a single site can have more than one Master Page, you can design one for text pages, one for tabular data pages, and another for media content, then combine them for really professional looking results.

Master pages save you the tedious work of remembering which style you used on previous pages as you develop the design and content. AThere's no need to keep track of all the various fonts and sizes you've used before, as including the Master Page takes care of that. All you really have to remember is what class you want to use for each section of the page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900