Welcome Guest ( Log In | Register)



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Simple Layouts
Joshthegreat
post Mar 10 2005, 05:47 PM
Post #1


Advanced Member
*******

Group: Members
Posts: 139
Joined: 25-February 05
From: England
Member No.: 3,991



New to HTML? try this simple website layout to get you started.

Well, start your site by creating a table to display your content.
HTML
<html>
<head>
<title>
My Webpage
</title>

<STYLE type=text/css>
<!--
@import url( yourname.css );
-->
</STYLE>
</head>

<body>

<table width="700" border="1" cellpadding="3" cellspacing="0" align="center" class="MAIN_TABLE">
<tr>
<td valign="top" height="100" colspan="2" class="CELL">
Your banner
</td>
</tr>
<tr>
<td width="15%" valign="top" height="25" class="CELL">
Menu
</td>
<td width="85%" valign="top" height="25" class="CELL">
Main Content
</td>
</tr>
<tr>
<td width="15%" valign="top" height="400" class="CELL">
<li><a href="link">Link</a>
<li><a href="link">Link</a>
<li><a href="link">Link</a>
<li><a href="link">Link</a>
<li><a href="link">Link</a>
<li><a href="link">Link</a>
</td>
<td width="85%" valign="top" height="400" class="CELL">
Your Main Content
</td>
</tr>
</table>

</body>
</html>


Save this file as 'Yourfile.html'

You have to say that if you have seen this file in action, it's really very dull.
So... Lets liven it all up with some css.

CSS can look quite complicated at first. Well, don't let that scare you away. It's actually quite simple.
HTML
BODY { BACKGROUND-COLOR: #0066CC; FONT-COLOR: #000000; FONT-FAMILY: verdana; TEXT-DECORATION: underline;
}


Save this file as Yourname.css.
You will notice that all this will do is make the bacground blue, and change the font to Verdana. This really doesn't do too much for your site. So lets spruce up the links shall we?

HTML
A { FONT-COLOR: #0066CC; }

A:hover { FONT-COLOR: #000000; TEXT-DECORATION: none;
}


This will make the links blue with an unerline. It will also mean that when you hover your mouse over the links the unerline will dissapear, they will turn black and the text will become bold.

Well your site will still be looking quite dull. So lets spruce up your table adding the class tag in your html. You'll notice in the table code at the top of the page you'll see class="MAIN_TABLE". This defines the table to you can customise it's appearence in the CSS.

HTML
.MAIN_TABLE { BACKGROUND-COLOR: 000000; BORDER: 1px solid #000000;
}



This will make the main table background black.
You'll also notice that in the html there is a class="CELL" bit of code on all of the cells. So lets spruce them up.

HTML
.CELL { BACKGROUND-COLOR; #FFFFFF;


This will make the cells white.
Well you can add whatever content you like and you may want to add some background images and regular images to make it look better. Also change the colors to suit what you want it to look like.

Well, hope my basic tutorial has helped some of you. If I happen to have a made a mistake somewhere, please tell me. And I'll correct it.
Go to the top of the page
 
+Quote Post
Raptrex
post Mar 10 2005, 11:36 PM
Post #2


Super Member
*********

Group: Members
Posts: 293
Joined: 14-August 04
Member No.: 808



pretty nice even though i didnt try it
i just looked at it really quick but its excellent for beginners

i wish i had this when i started
Go to the top of the page
 
+Quote Post
NotoriousZach
post Mar 11 2005, 02:28 PM
Post #3


Member [Level 1]
****

Group: Members
Posts: 55
Joined: 26-February 05
Member No.: 3,996



I agree great job....The basic stuff can help the people trying to learn HTML.
Go to the top of the page
 
+Quote Post
Joshthegreat
post Mar 23 2005, 04:51 PM
Post #4


Advanced Member
*******

Group: Members
Posts: 139
Joined: 25-February 05
From: England
Member No.: 3,991



Thanks for your comments guys. That makes me feel happy that I can actualy contribute with a good tutorial. I'll probably write some more ones now, hopefully they'll be as decent as this one.
Go to the top of the page
 
+Quote Post
HmmZ
post Mar 23 2005, 04:52 PM
Post #5


Super Member
*********

Group: Members
Posts: 362
Joined: 2-March 05
From: The Netherlands
Member No.: 4,097



Nicely detailed and covers some important basic aspects, thanks for your great tutorial smile.gif
Go to the top of the page
 
+Quote Post
rectab
post Mar 25 2005, 04:45 PM
Post #6


Newbie [Level 2]
**

Group: Members
Posts: 32
Joined: 25-March 05
Member No.: 4,889



pretty nice even though i didnt try it
Go to the top of the page
 
+Quote Post
yoofus
post Mar 25 2005, 08:58 PM
Post #7


Member [Level 1]
****

Group: Members
Posts: 74
Joined: 25-March 05
From: England
Member No.: 4,906



Good work Josh, I didn't try it but it will really help beginner webmasters.
Go to the top of the page
 
+Quote Post
snlildude87
post Mar 25 2005, 09:39 PM
Post #8


Moderator
***************

Group: Members
Posts: 2,325
Joined: 8-March 05
From: Mawson, Antarctica
Member No.: 4,254



I agree with what everyone said - nice simple tutorial! The only thing I don't agree with is using tables for positioning because the browser has to render every aspect of the table first before displaying your site.

Other than that, way to go! smile.gif
Go to the top of the page
 
+Quote Post
demongaara
post Mar 26 2005, 06:18 AM
Post #9


Member [Level 1]
****

Group: Members
Posts: 72
Joined: 26-September 04
Member No.: 1,273



ooo thanks a bunch, ive been looking for something liek this. now i need to learn how to slice layouts ><