Go Back   BioRUST Forums > Graphics Software & Support > HTML / PHP / ASP / JS

Reply
 
LinkBack Thread Tools Display Modes
Old 10-28-2007   #1 (permalink)
Registered User
 
Join Date: Oct 2007
Posts: 43

Send a message via MSN to Neo824
[CSS] What is the difference between an ID and a CLASS?

My question is in the title, but I will restate it. What is the difference between an ID and a Class in CSS?

Thank You
Neo824 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2007   #2 (permalink)
photoshop ninja
 
agentxi's Avatar
 
Join Date: Oct 2006
Location: Red Deer - ish, alberta
Posts: 516

CSS Tutorial - ID vs Class
__________________

Your a Graphic Designer...If you could go back in time you wouldn't go back to see the rise and fall of civilizations, you'd go back in time to destroy comic sans and papyrus.
agentxi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2007   #3 (permalink)
Janitor of Lunacy
 
tamlin's Avatar
 
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 4,966

Quote:
Originally Posted by Neo824 View Post
Thank you for being one of the few people that respond to my questions.
Believe it or not, we are not a Technical Support helpline. The members at BioRUST do not constantly monitor the boards, searching for problems to solve. If someone happens by who can help, they usually will do, but comments like the above and this one: http://forums.biorust.com/html-php-a...html#post45669 (CSS - Rollover image problem with IE) won't make people come to your aid any quicker. Probably the reverse, actually.
__________________


Religion: It's all fun and games until someone gets burned at the stake...
tamlin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2007   #4 (permalink)
Registered User
 
Join Date: Oct 2007
Posts: 43

Send a message via MSN to Neo824
Quote:
Originally Posted by tamlin View Post
Believe it or not, we are not a Technical Support helpline. The members at BioRUST do not constantly monitor the boards, searching for problems to solve. If someone happens by who can help, they usually will do, but comments like the above and this one: http://forums.biorust.com/html-php-a...html#post45669 (CSS - Rollover image problem with IE) won't make people come to your aid any quicker. Probably the reverse, actually.
I'm sorry...I am just frustrated about a problem that I am having with my website.
Neo824 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2007   #5 (permalink)
Janitor of Lunacy
 
tamlin's Avatar
 
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 4,966

No probs - I know what it's like when things aren't working and you don't know where to turn!

I noticed you've posted a few questions: are these all related to the same problem you're having? Maybe if you could give a bit more detail as to what you're trying to do and any error messages you're getting and stuff like that, it would give people more of an idea of how to answer your questions.
__________________


Religion: It's all fun and games until someone gets burned at the stake...
tamlin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2007   #6 (permalink)
Registered User
 
Join Date: Oct 2007
Posts: 43

Send a message via MSN to Neo824
Quote:
Originally Posted by tamlin View Post
No probs - I know what it's like when things aren't working and you don't know where to turn!

I noticed you've posted a few questions: are these all related to the same problem you're having? Maybe if you could give a bit more detail as to what you're trying to do and any error messages you're getting and stuff like that, it would give people more of an idea of how to answer your questions.
No, they are not all related. xD I just ask a lot of questions. The only REAL problem that I am having, is the CSS problem. This page: EOSS - Endless Online Super Speed works fine in Mozilla Firefox...but in Internet Explorer the rollovers and links do not work and the margins are messed up. I've asked a lot of people, none have been able to help me. Any help will be appreciated!

Thank you -
Neo
Neo824 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-29-2007   #7 (permalink)
PHP Lover
 
Join Date: May 2007
Location: Zug, Switzerland
Posts: 84

An ID is a unique identifier, like a social security number or so, where as a class can be used by any element on a page. You can also set styles by id. For example, your element id is "my_id". You could do a css such as
Code:
#my_id{font-weight:bold;}
__________________
You can call me Greg or Greggy, as you wish
Gjbphp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-29-2007   #8 (permalink)
Rusty Bio-Hazard!
 
notjustgraphics's Avatar
 
Join Date: Sep 2006
Location: Toronto, Ontario, Canada
Posts: 1,067

Send a message via MSN to notjustgraphics
AgentXI's link is very helpful...

Actually, i learned a couple of things.

Still, the basic prinicple is that an ID assigns formatting that is unique whereas a CLASS assigns formatting that may apply to more than one object.

Indeed a DIV assigned an ID could also have a CLASS.

An example would be to use unique ID's to position a div while the CLASS assigned to it controls it's appearance such as border's, colors, text-alignments, etc...

Mike.

HTML Code:
#myDiv1 {
  width:100px;
  float:left;
}

#myDiv2 {
  width:200px;
  float:right;
}

.myClass {
  border:1px solid #fff;
  text-align:center;
  font-size:10px;
}
HTML Code:
<div id="myDiv1" class="myClass">
This div will be 100px wide and float left. The contents will be center aligned @ 10px font size. It will have a 1 pixel solid white border.
</div>

<div id="myDiv2" class="myClass">
This div will be 200px wide and float to the right. The contents will also be center aligned @ 10px font size. It too will have a 1 pixel solid white border.
</div>
__________________

Last edited by notjustgraphics; 10-29-2007 at 01:39 PM.
notjustgraphics is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the difference between height, scrollHeight and style.height jadeite100 HTML / PHP / ASP / JS 1 06-01-2007 01:11 PM
Gamma difference Windows & Mac MoodsR4Cattle HTML / PHP / ASP / JS 1 02-08-2007 01:49 PM


All times are GMT +1. The time now is 05:50 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT