Simple Machine Codes
March 18, 2010, 01:06:12 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Affiliates Code Index Staff List Calendar Members Login Register  

CSS - Cascading Style Sheet


Pages: [1]   Go Down
  Print  
Author Topic: CSS - Cascading Style Sheet  (Read 323 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,668



View Profile WWW
« on: March 16, 2008, 09:37:20 pm »

Alright, here is a tutorial on one of the easiest Coding ways ever!

CSS
CSS Stands for Cascading Style Sheet.
You see it on every single website there is Smiley  CSS is the looks of the Site your on.  The Background, Font, font color, width, height, and so on, is all in CSS.

So, How do you start using CSS?
Simply just start with the Style Tags (You do'nt need them if your going to code CSS for SMF for Free).
Code:
<style>

</style>

Now, To the Accuall CSS Part.  First, you need to designate which items will be effected:
Code:
<style>
body

.class

#id
</style>
In the Above coding, you have three diffrent ways you can add styles to things.  "body" is a tag.  You can use any tag though, such as table, tr, td, span, div, a and so on.

.class is the class of the object.  The object must has a class='CLASS_NAME' in the tag for that class to work.  In CSS, you can recognize a class by a period at the begginning of the name.

#id is the ID of the object.  Just like Class, you need id="ID_NAME"  in the tab name for it to work.  The Number sign at the beggning recognizes it as a ID.

Now, to add the diffrent thing you can do with it:
Code:
<style>
body {

}

.class {

}

#id {

}
</style>

You must have the brackets in order for the CSS to actually do anything for that element.  The Brackets are { or }.  That is where all the information will be going:
Code:
<style>
body {
   background-color: red;
}

.class {
  background: url(Insert_URL);
}

#id {
  width: 400px;
  height: 100px;
}
</style>

As you can see, all the properties of the tag, class or ID are inside the brackets.  You can have it shortend too Smiley
Code:
<style>
body{background-color: red;}
.class{background: url(Insert_URL);}
#id{width: 400px; height: 100 px;}
</style>
That would be the exact same thing.  It is just alot easier to have it like the first one.


Since there are alot of properties for CSS, I will just put a link for yall to go by Smiley

http://htmlhelp.com/reference/css/properties.html
« Last Edit: May 18, 2009, 07:25:56 am by Agent Moose » Share Report Spam   Logged

Blahs
100 Club Member

Offline Offline

Posts: 184


Rockstar!


View Profile WWW
« Reply #1 on: March 17, 2008, 05:52:37 am »

Excellent guide agent I really enjoied!
Report Spam   Logged


Join my forums!!!!
Url: http://silabforums.smfforfree4.com/index.php
tonypker13
Ummmm Did I just Pwn myself?
Members

Offline Offline

Posts: 86

I think i just owned myself?


View Profile
« Reply #2 on: June 14, 2008, 08:05:40 pm »

W00t!! now i can add new styles to the drop down skin chooser! thanks!
Report Spam   Logged


Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Hostgator Hosting