ociugi Posted September 19, 2007 Share Posted September 19, 2007 what are the differences between class and id. when should i use class / id. Quote Link to comment https://forums.phpfreaks.com/topic/69908-class-vs-id/ Share on other sites More sharing options...
tarun Posted September 19, 2007 Share Posted September 19, 2007 Classes are for when you want to use the styling on 1 or more objects. IDs can only be used on one single object. More details can be found here: http://css-discuss.incutio.com/?page=ClassesVsIds Quote Link to comment https://forums.phpfreaks.com/topic/69908-class-vs-id/#findComment-351200 Share on other sites More sharing options...
bronzemonkey Posted September 19, 2007 Share Posted September 19, 2007 id also has a higher specificity than class their names give the game away - a class is a broad "type"; an id is a specific and unique label really, you should have looked in the opening part of any basic css tutorial and you'd have found the answers to your questions Quote Link to comment https://forums.phpfreaks.com/topic/69908-class-vs-id/#findComment-351226 Share on other sites More sharing options...
dbrimlow Posted September 19, 2007 Share Posted September 19, 2007 You've asked a very important question. Here is an easy to understand link about the whole thing (it is SO worth it to go to this site and learn the basics) bookmark this link - after 3 years, I still occasionally go to it when I get stumped: http://css.maxdesign.com.au/selectutorial/ Quote Link to comment https://forums.phpfreaks.com/topic/69908-class-vs-id/#findComment-351389 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.