Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2008-03-14, 05:22 AM   #4
HarryM
No offence Apu, but when they were handing out religions you must have been out taking a whizz
 
HarryM's Avatar
 
Join Date: Jan 2004
Location: Australia
Posts: 285
Send a message via ICQ to HarryM
It's easy to learn CSS if you understand the concept of basic object orientated programming, you just write the html doccument and then later add the styles to the objects.
There's nothing too hard about it, just need to learn some different commands other than font, size, B, align, etc.

Elements like body, p, h1, etc don't need an identifier like class or ID.
eg.

Code:
body
{
 background:#444444;
 color:#ffff00;
}

p 
{
 padding:0px;
 margin:0px;
}
h1 
{
 text-align:right;
 font-weight:normal;
}
Basically if an object is used once only in your pages, make it an ID (#something).
If it's going to be used on the one page more than once make is a class (.something).
Then style the ID's and classes with what you want like.

eg.

Code:
#anId
{
 color:#ff00ff;
 background:#ffffff;
 border:4px solid #ff0000;
}

.aClass
{
 color:#000000;
 background:#ffffff;
 border: 4px solid #ff0000;
}
Basically if you are getting rid of tables, your HTML doccument should make sense without any styles.
If you look at a site done with tables and no stylesheet it will most likely be unintelligible.
But a site made with lists and divs instead should still be functional without the style sheet.

A good thing about CSS is that if you are using an external style sheet, you can change the appearance, graphics, background, etc. of your entire website of 10,000 pages by uploading one file.

Some ok sites:
http://www.csszengarden.com/
http://css.maxdesign.com.au/listamatic/
http://jigsaw.w3.org/css-validator/
__________________
Click here to make huge $$$
HarryM is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:55 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc