Template Categories

templates categories Automobiles
templates categories Business
templates categories CSS Templates
templates categories E-Commerce
templates categories Education
templates categories Fashion
templates categories Greeting Cards
templates categories Hotels
templates categories Jewelry
templates categories kids
templates categories Models
templates categories Music - Films
templates categories Night Club
templates categories Real Estate
templates categories Restaurant
templates categories Software
templates categories Sports
templates categories Travel
templates categories Web-design
templates categories Wedding

Tutorial Categories

tutorial categories AJAX
tutorial categories CSS
tutorial categories Dreamweaver
tutorial categories Flash
tutorial categories FTP - File Transfer
tutorial categories HTML Emails
tutorial categories Javascript
tutorial categories Microsoft Excel
tutorial categories Microsoft Windows
tutorial categories Microsoft Word
tutorial categories MySql
tutorial categories Photoshop
tutorial categories Php
tutorial categories Windows Movie Maker
tutorial categories Xhtml / Html
css template

In this easy CSS and XHTML tutorial I will teach you how to create a simple yet attractive website template which will be fluid in nature. Look at the image above. This is what we will be creating.

First off the CSS :

Reset the margin and the padding for all.

* {
margin:0;
padding:0;
}

If you notice the layout as shown above the background is a simple gradient ( from dark bluish grey to light grey ) which can be made in photoshop or any other image editing software. The gradient after a certain depth merges with the body colour. Therefore we define the background image as well as background colour too. We also want the gradient to repeat horzontally which can be set by the repeat x property.

body {
background: #bfbfc9 url(tree.jpg) repeat-x;
}

Next comes the big tree on the right side of the layout. We want it to remain at the bottom and on the right. For this we will use the absolute positioning method. We will also define the width and the height of the image.

#tree {
background: url(tree1.gif) no-repeat;
position:absolute;
bottom: 0;
right: 40px;
width: 188px;
height: 433px;
}



The only important property here is text-indent which we will negatively position for h1 text to remain off the layout.

#logo {
background: url(logo.jpg) no-repeat;
position:absolute;
top: 0%;
right: 40px;
width: 220px;
height: 60px;
text-indent: -9999px;
margin: 0;
}

The first of the content DIV's is the intro div. We will introduce the web design studio company here in this div. The width of the div is important here, which we have set at 450px. The padding=left property is set to 96px so that the content can shift on the right thereby avoiding overlapping with the image. The intro p property is for formatting purpose.

#intro {
background: url(brand.gif) no-repeat;
position:absolute;
top: 18%;
left:40px;
width: 450px;
padding: 0 5px 0 96px;
}
#intro p {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:14px;
color:#FFFFFF;
line-height:130%;
}
Continued - page 2