View Full Version : What is the difference between .header or #header in CSS
I wish to figure out the difference between .header and if I write #header rules in a CSS file. I mean this content in a CSS file:
What is the difference?
05-13-2009, 03:24 AM
"." points to a class
"#" points to an id
Header ID DIV
Header Class DIV
your .header style will affect the second example
and your #header style will affect the first.
05-13-2009, 03:28 AM
05-13-2009, 08:59 AM
05-13-2009, 10:03 AM
it's all in those links I'm sure but if you can't be bothered reading them it's worth pointing out that an ID should be unique and can only be used once, classes can be used as many times as you like
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.