Learn HTML step-by-step from A to Z or improve your professional skills.  Home HTML and CSS Tutorials The Basics of CSS Tableless
Your Ad Here

The Basics of CSS Tableless


This is a simple tutorial on how to make a basic Cascading Style Sheet tableless webpage. I will show you how to use Dreamweaver to code a tableless webpage without any knowledge of CSS coding. It is intended for non-experienced CSS coders or beginners.

In this tutorial, I will use a simple webpage with the following containers: Header, Left Column, Right Column, and Footer.

Click here to preview the page

Layout

Here is the layout:

layout

1. Body Tag

Open your CSS Styles pallate, click on the New CSS Rule(+) icon to make a new css style.

css pallate

Then the new CSS window will pop. Select Tag in the Selector Type. In the Tag dropdown, select 'body' or type in 'body'. In general, you should define all your CSS in a separate file by selecting "Define in: New Style Sheet File". But for this tutorial purpose, I'm going to write the CSS in the same file: "This document only".

new css

Now in your CSS definition window, it allows to define almost everything with CSS. You can set style for Type, Background, Box area, Border, Padding, Margin, List style, etc. In the Box options, enter Width=770, Margin Right=auto, Margin Left=auto. This will set the html 'body' tag to 770px wide, align to center.

css definition

2. Header Tag

Now, add another CSS style and name it '.header'. Enter Width:770px, Height:130px, Background:#CCCCCC.

new css

Go to Dreamweaver Code view and enter the following code within the body tag. Then preview your page by pressing F12 in Dreamweaver, and you should see a 770x130 grey rectangle with text "header" in it .

code

3. Left Column

Add another CSS class, '.left_column' and enter the following information:

left column

Float:left is use to align '.left_column' to the left.

4. Right Column

Again, very similar to '.left_column' but this will align to right because I set Float: right.

right column

5. Footer

Finally, add the last CSS class '.footer' and enter the following information:

footer

Notice this time I entered Clear: right ? This will clear the right float of the '.right_column' and display '.footer' below.

6. Enter the HTML codes

Now enter the final HTML codes as follow and your page should look like this.

html codes

Editing CSS styles

At any time you can edit your CSS styles by double click on the class name or in the source code window.

editing css



Author's URL: Nick La
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

HTML is Hyper Text Markup Language that is used to make hypermedia and hypertext documents for the Web. More HTML and CSS: Most Popular Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com

Add comments to "The Basics of CSS Tableless"

Only registered users can write comment

No comments yet...