bravemouse header image 1

bravemouse

teach yourself

bravemouse header image 2

CSS Positioning Intro Part 1: Why use CSS Positioning?

August 11th, 2009 by klip

This is the first post in a short series on how to use Cascading Style Sheets to control the layout of HTML web pages.  To get the most out of this series, you should already know some basic HTML & CSS, which you will find in the HTML & CSS Day Course.

CSS Positioning is the art of using Cascading Style Sheets to control the layout of a web page.  You may already have come across CSS positioning, if you have ever tried to edit your own blog template.  Once you understand the basics of CSS positioning you will be able to edit your own blog template to  create a unique look and feel.

In previous posts, we saw that CSS can be used to control some aspects of your web site's "look".  You can use  CSS to specify the size of text, the font used, background colours and so on. The post  "why use CSS"  explained how CSS can achieve a level of control not possible with other methods.  And the real power of CSS is in using it to control the entire look of your site, including the layout – CSS Positioning.

Before CSS Positioning came along, people used tables to set the layout of a web page.  Many people still do.  But with CSS Positioning, you can achieve effects that are impossible with tables. Plus – you can change the layout  an entire website by editing a single document – your external CSS document. You may find it confusing at first but once you get used to the level of control and flexibility, you wont want to go back to table based layouts.

You may want to read a little bit more about "table-less layouts".   Not everyone agrees with this view that "tables are old fashioned".  Here is an article that looks at the question.

Or the other side of the argument:  CSS Zen Garden is a site that exists solely to exhibit the benefits of CSS Positioning.  Their site states: "There is clearly a need for CSS to be taken seriously by graphic artists. The Zen Garden aims to excite, inspire, and encourage participation."  Have a look, and in particular, try out the "select a design" links on the right to see CSS in action.

So lets get on with it then!   The next post in this series deals with the first concept you have to master:  "The HTML Box model".

Tags:   No Comments

Leave a Comment

0 responses so far ↓

There are no comments yet...Kick things off by filling out the form below.