|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
CSS Lesson 1 -Fixed Layout Basics
For those who are interested in building a CSS enabled website I will give you a basic understanding of some good things to do when starting out.
1. Decide if you want the layout of the site to be fixed or relative to the screen size. Fixed will always stay the same size and relative will be positioned in the center of the page. 2. If it is fixed then what you need to do is choose your width. I like around 780 because it looks okay on a 800x600 monitor. Then what you do is create a <div> with that width and name it maincontainer or something similar. Html: Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <title>My Site</title> <link rel="STYLESHEET" href="defaultTheme.css" type="text/css"> </head> <body> <div id="maincontainer"> </div> </body> </html> CSS: Code:
body { background-color: #00000; } #maincontainer { margin-left:auto; margin-right:auto; width:780px; border: 1px solid black; } Now there are two types of elements. There is the inline element which takes up only its length on a line and then there is the box element that takes the entire line. You need to know which ones are box and which are inline by default. Later on I will post a link to a table that shows most elements and their display type.
__________________
Last edited by atholon; 07-20-2008 at 12:53 PM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mature: A Golfing Lesson? | bigsmellyfart | Humor & Jokes | 3 | 07-29-2009 02:26 PM |
CSS Lesson 2 - Header and Body | atholon | Web design and Programming | 0 | 07-20-2008 12:53 PM |
History lesson. | Mauser 98K | General Chat | 2 | 06-06-2007 10:51 PM |
A salutary lesson to us all! | BADDOG | General Chat | 0 | 08-08-2005 09:45 AM |
A Lesson in Life | Stalker61 | Humor & Jokes | 2 | 08-16-2004 05:54 AM |