Hi guys im confuse on what to use.. Please give me more assistance to whats the best to use between class and identifier at css.. Please advice. Kojak
i presume that you are talking about using .class vs #id right? it's pretty simple #id can be used only one time in a page's code. for example, you can use is for a big div, enclosing all the information of the page, like < div id="someid" > ... whole content < / div > .class can be used multiple times....like for some list elements... < li class="someclass" < li class="someclass" < li class="someclass" etc...
The value of an ID can only be used, but you can have multiple ID attributes. I prefer IDs to classes, unless there are specific sections of a block that have to be styled differently from the rest. But even then, I'll use IDs and classes sparingly, instead preferring to let the stylesheet grab the elements of a page based on their parents. This does take some experience, but is well worth learning.