<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: class vs. ID</title>
	<atom:link href="http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/</link>
	<description></description>
	<lastBuildDate>Wed, 01 Sep 2010 23:07:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: LawLawLaw: Erik J. Heels</title>
		<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/comment-page-1/#comment-8095</link>
		<dc:creator>LawLawLaw: Erik J. Heels</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/#comment-8095</guid>
		<description>&lt;trackback /&gt;&lt;strong&gt;Movable Type Brain Dump&lt;/strong&gt;
Tips and tricks I wish I had known when I started using Movable Type.
</description>
		<content:encoded><![CDATA[<trackback /><strong>Movable Type Brain Dump</strong><br />
Tips and tricks I wish I had known when I started using Movable Type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Just Orb</title>
		<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/comment-page-1/#comment-8094</link>
		<dc:creator>Just Orb</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/#comment-8094</guid>
		<description>&lt;trackback /&gt;&lt;strong&gt;Simple explanation.&lt;/strong&gt;
Thanks to Scriptygoddess, I now understand the difference between the CSS tags &quot;div id&quot; and &quot;div class&quot;. My CSS is</description>
		<content:encoded><![CDATA[<trackback /><strong>Simple explanation.</strong><br />
Thanks to Scriptygoddess, I now understand the difference between the CSS tags &#034;div id&#034; and &#034;div class&#034;. My CSS is</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ste</title>
		<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/comment-page-1/#comment-8093</link>
		<dc:creator>ste</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/#comment-8093</guid>
		<description>Yeah, from what I&#039;ve read, the main differences between ID and class are that ID is applied only the first time it is used in a document where class can be applied to many different instances. So for example, you could have defined:
#pageHead { properties },
and in your document, only the first &lt;div id=&quot;pageHead&quot;&gt; would have the properties specified. And contrasting, you could have defined:
.sectionHead { properties },
and any &lt;div class=&quot;sectionHead&quot;&gt; in your document would have the properties. For most uses, I think it&#039;s better to use classes, unless you&#039;re absolutely certain you&#039;re only going to use the ID once (or want to make sure you only use the ID once).</description>
		<content:encoded><![CDATA[<p>Yeah, from what I&#039;ve read, the main differences between ID and class are that ID is applied only the first time it is used in a document where class can be applied to many different instances. So for example, you could have defined:<br />
#pageHead { properties },<br />
and in your document, only the first &lt;div id=&#034;pageHead&#034;&gt; would have the properties specified. And contrasting, you could have defined:<br />
.sectionHead { properties },<br />
and any &lt;div class=&#034;sectionHead&#034;&gt; in your document would have the properties. For most uses, I think it&#039;s better to use classes, unless you&#039;re absolutely certain you&#039;re only going to use the ID once (or want to make sure you only use the ID once).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kristine</title>
		<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/comment-page-1/#comment-8092</link>
		<dc:creator>kristine</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/#comment-8092</guid>
		<description>Also - when I just set up my newest skin, I used ID&#039;s to absolutely position the background images.  I figured that I would never use #top1 - #top6 accidently as classnames, and since there was only one of each image, I&#039;d insure that they were the only things that got absolutely positioned the way they did :)  I notice that Image Ready does this if you tell it to generate CSS instead of Tables, too.</description>
		<content:encoded><![CDATA[<p>Also &#8211; when I just set up my newest skin, I used ID&#039;s to absolutely position the background images.  I figured that I would never use #top1 &#8211; #top6 accidently as classnames, and since there was only one of each image, I&#039;d insure that they were the only things that got absolutely positioned the way they did <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   I notice that Image Ready does this if you tell it to generate CSS instead of Tables, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kristine</title>
		<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/comment-page-1/#comment-8091</link>
		<dc:creator>kristine</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/#comment-8091</guid>
		<description>Here&#039;s my example of ID vs Class - In the MT default templates, there&#039;s a #content and a #links.  These are the 2 main sections of the page (main posts and sidebar), and because they are only referred to once in the html, they are IDs instead of classes.  
Personal thought - I think this is a stronger definition than a class definition, when you look at the cascading of the stylesheet.  It seems to be more important, and that works well if you are only going to have that section once in the document.

Ahh, and &lt;a href=&quot;http://www.mako4css.com/BasClass.htm&quot; target=&quot;_blank&quot;&gt;Here&#039;s more info&lt;/a&gt; on this subject - I knew I&#039;d read more somewhere!  This explains what I said a bit better :)</description>
		<content:encoded><![CDATA[<p>Here&#039;s my example of ID vs Class &#8211; In the MT default templates, there&#039;s a #content and a #links.  These are the 2 main sections of the page (main posts and sidebar), and because they are only referred to once in the html, they are IDs instead of classes.<br />
Personal thought &#8211; I think this is a stronger definition than a class definition, when you look at the cascading of the stylesheet.  It seems to be more important, and that works well if you are only going to have that section once in the document.</p>
<p>Ahh, and <a href="http://www.mako4css.com/BasClass.htm" target="_blank">Here&#039;s more info</a> on this subject &#8211; I knew I&#039;d read more somewhere!  This explains what I said a bit better <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/comment-page-1/#comment-8090</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/#comment-8090</guid>
		<description>Can anyone give me a &quot;good&quot; example of when to use IDs over classes? (If there is one?? Or as a general rule should one just use class= all the time and forget the whole ID thing?)

(And Erica brought up another question... when do you use # or . when defining a custom class? - I always use . but you can # and still call it with class=&quot;classname&quot;.)</description>
		<content:encoded><![CDATA[<p>Can anyone give me a &#034;good&#034; example of when to use IDs over classes? (If there is one?? Or as a general rule should one just use class= all the time and forget the whole ID thing?)</p>
<p>(And Erica brought up another question&#8230; when do you use # or . when defining a custom class? &#8211; I always use . but you can # and still call it with class=&#034;classname&#034;.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn</title>
		<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/comment-page-1/#comment-8088</link>
		<dc:creator>Shawn</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/#comment-8088</guid>
		<description>This is actually just a side effect.  The real reason for the two is that Microsoft defined ID (and uses it when writing Microsoft-specific COM objects to interface with a web page), while the W3C defined the class attribute with a similar function.</description>
		<content:encoded><![CDATA[<p>This is actually just a side effect.  The real reason for the two is that Microsoft defined ID (and uses it when writing Microsoft-specific COM objects to interface with a web page), while the W3C defined the class attribute with a similar function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cis</title>
		<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/comment-page-1/#comment-8089</link>
		<dc:creator>Cis</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/#comment-8089</guid>
		<description>For pratical purposes though, using the same ID division more than once in a single page can cause problems with your site resolving properly.  The best HTML comparison would be the NAME attribute, I think.</description>
		<content:encoded><![CDATA[<p>For pratical purposes though, using the same ID division more than once in a single page can cause problems with your site resolving properly.  The best HTML comparison would be the NAME attribute, I think.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erica</title>
		<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/comment-page-1/#comment-8086</link>
		<dc:creator>erica</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/#comment-8086</guid>
		<description>Ah I don&#039;t blame you, I had to look into it a few months ago, and I still always end up using # instead of . or vice versa.</description>
		<content:encoded><![CDATA[<p>Ah I don&#039;t blame you, I had to look into it a few months ago, and I still always end up using # instead of . or vice versa.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erica</title>
		<link>http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/comment-page-1/#comment-8087</link>
		<dc:creator>erica</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2002/09/12/class-vs-id/#comment-8087</guid>
		<description>What my understanding was;
&quot;The difference is an ID is unique to one area, classes are not. Thus IDs can be used in conjunction with Javascript/DHTML.&quot;

Related - 
http://bitworking.org/stories/2002/02/16/cssCodingStyle.html</description>
		<content:encoded><![CDATA[<p>What my understanding was;<br />
&#034;The difference is an ID is unique to one area, classes are not. Thus IDs can be used in conjunction with Javascript/DHTML.&#034;</p>
<p>Related &#8211;<br />
<a href="http://bitworking.org/stories/2002/02/16/cssCodingStyle.html" rel="nofollow">http://bitworking.org/stories/2002/02/16/cssCodingStyle.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.315 seconds -->
