![]() |
|
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. * { |
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 { |
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 { |
|
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 |
About Me :
I am a Web designer from Mumbai India. The recent changes
in web design standards has brought in lots of misunderstandings
and misconceptions. The idea behind the web 2.0 standardisation ....read the complete article
Following are the tools / packages and technologies I use for creating
my websites.
Contact Me :
Please contact me for web-design work
Please fill up the form :