CLASS is niet meer of minder krachtig dan ID. Beide hebben hun eigen functionaliteiten. ID is van toepassing op slechts één element ("geef mij je identiteitspapieren"), terwijl CLASS ("de schoolklas 6WB, naar voren komen!") een hele groep elementen aangeeft.
Next time i'll write in chinese! Didn't it occur to you that most forum users are not fluent in english? The answer to your question is in the bold text.
What kind of rude reply was this?? If you cannot give answers to somebody u have no right to belittle them!!! Even if most of forum users are not v conversant with english still the language of conversation here is english only and everybody uses this v language no matter how well they know the language!!!
The post in question was not about english or not, but about etiquette.
For instance by checking that your keyboard has no letters missing
Some people need to translate the page using online translators, and they don't work well with this sort of text.
Hw is ID more powerful than Class as u hv stated in yr reply?
And the translated text is:
A class is a group of elements. "Class of 69" containing more than one student.
It's mostly used for formatting, to give a consistent look to your pages (headings, definition lists, ... always in the same style. It's a very powerful way of ensuring that your whole site has the same layout.
An ID is a single element ("Show me your ID!"). Most people only have one ID.
fyi, document.getElementById('aaa').... does not work with all explorer versions.
Allright from now on I will try to type in complete words. Thanks for your reply!!
True, but why would you be writing scripts for only IE4+? There are way more Firefox users than IE4 users, let alone users of other non-IE browsers, like Safari. (IE5+ supports document.getElementById())
Originally Posted by mdoigny
Simply put this is because of the cascade order. Every element is scored and styles are applied based on these scores.
Originally Posted by swatisharma
Here's the basics
Specificity values are sorted in left to right presedence; hence containing eight element identifiers, (0,0,0,8) has a lower specificity then a single class identifier (0,0,1,0).
Selector | Specificity
Universal selector | 0,0,0,0
element identifier | 0,0,0,1
class identifier | 0,0,1,0
id identifier | 0,1,0,0
embeded style | 1,0,0,0
Last edited by bokeh; 12-14-2005 at 07:47 AM.
Or... Search for a CSS EDITOR, such as TopStyle
Originally Posted by Dark Dragon
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)