Jump to content
Sign in to follow this  
cvandyck

# and . prefix in CSS code

Recommended Posts

cvandyck

when editing CSS code sometime it is prefixed by a "#" and sometimes by a period "." Could you tell me when one or the other is the correct prefix?

Share this post


Link to post
Share on other sites
Danny
The # is when an element has an ID, like this for example:
The . is when an element is a class, like this for example:
Check these pages, this should help you understand. http://www.w3schools.com/css/css_id_class.asp http://www.tizag.com/cssT/cssid.php

Please search our forums, before posting!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×