Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
Difference Between <DIV> Tags?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Ecko" data-source="post: 209068" data-attributes="member: 24874"><p>To expand on this:</p><p>id's are unique, classes are not. For example, you should only use id of "box" once per page. id's also take precedence over classes because of specificity (<a href="http://www.w3.org/TR/CSS2/cascade.html#specificity" target="_blank">http://www.w3.org/TR/CSS2/cascade.html#specificity</a>).</p><p> </p><p>Here's how somehow explained it to me a long time ago (think of it as school)</p><p><div id="JohnSmith" class="Math"></p><p><div id="JaneDie" class="Math></p><p> </p><p>Each student has their own ID, but they can share classes with each other. No student would have the same ID.</p><p> </p><p>Easiest way is to read the documentation:</p><p><a href="http://www.w3.org/TR/CSS2/cascade.html" target="_blank">http://www.w3.org/TR/CSS2/cascade.html</a></p></blockquote><p></p>
[QUOTE="Ecko, post: 209068, member: 24874"] To expand on this: id's are unique, classes are not. For example, you should only use id of "box" once per page. id's also take precedence over classes because of specificity ([URL]http://www.w3.org/TR/CSS2/cascade.html#specificity[/URL]). Here's how somehow explained it to me a long time ago (think of it as school) <div id="JohnSmith" class="Math"> <div id="JaneDie" class="Math> Each student has their own ID, but they can share classes with each other. No student would have the same ID. Easiest way is to read the documentation: [URL]http://www.w3.org/TR/CSS2/cascade.html[/URL] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
Difference Between <DIV> Tags?
Top