 <?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: Learning The Basics of CSS Faster Than Ever</title>
	<atom:link href="http://www.devinrolsen.com/learning-the-basics-of-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devinrolsen.com/learning-the-basics-of-css/</link>
	<description>From Developer to Developer Information and Sharing</description>
	<lastBuildDate>Wed, 01 Feb 2012 23:06:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Prateek</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-6787</link>
		<dc:creator>Prateek</dc:creator>
		<pubDate>Wed, 21 Dec 2011 17:11:13 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-6787</guid>
		<description>Devin,
I wanted to use the same background in my project.
It would be great if u could share the details.</description>
		<content:encoded><![CDATA[<p>Devin,<br />
I wanted to use the same background in my project.<br />
It would be great if u could share the details.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devin R. Olsen</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-6257</link>
		<dc:creator>Devin R. Olsen</dc:creator>
		<pubDate>Wed, 05 Oct 2011 15:55:09 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-6257</guid>
		<description>@Simon - 

&quot;If you have several entries named &quot;.rightsidebar&quot; in your style sheet, how would the browser know which one you are referring to?&quot;

By using what is called specificty in your &quot;entries&quot; (&lt;em&gt;called selectors&lt;/em&gt;). Lets say you have 4 variations of a right hand side bar, (&lt;em&gt;short, tall, blue and green&lt;/em&gt;) you have a few options to add specificity here. One way would be to use additional classes next to this &quot;.rightsidebar&quot; class like so:

&lt;div class=&quot;rightsidebar tall&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;rightsidebar short&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;rightsidebar blue&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;rightsidebar green&quot;&gt;&lt;/div&gt;

and the css would be:

.rightsidebar {
     border:1px solid #000;
     margin:15px;
     padding:15px;
     width:200px;
}
.rightsidebar.tall { height:400px; }
.rightsidebar.short { height:100px; }
.rightsidebar.blue { background:#000099; }
.rightsidebar.green { background:#00ff00; }

See how we have the .rightsidebar that has repeated styles then we use another class to add specificity to our selectors. Another method of adding specificity to a selector is to first select a unique parent and use it&#039;s id or class in our selector.

&lt;div id=&quot;primary&quot;&gt;
     &lt;div class=&quot;rightsidebar&quot;&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div id=&quot;secondary&quot;&gt;
     &lt;div class=&quot;rightsidebar&quot;&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div id=&quot;tertiary&quot;&gt;
     &lt;div class=&quot;rightsidebar&quot;&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div id=&quot;footer&quot;&gt;
     &lt;div class=&quot;rightsidebar&quot;&gt;&lt;/div&gt;
&lt;/div&gt;

.rightsidebar {
     border:1px solid #000;
     margin:15px;
     padding:15px;
     width:200px;
}

#primary .rightsidebar { height:400px; }
#secondary .rightsidebar { height:100px; }
#tertiary .rightsidebar { background:#000099; }
#footer .rightsidebar { background:#00ff00; }

So here we used parent element&#039;s ids in our selectors to add specificity between the different variations of a &quot;.rightsidebar&quot; classed element. Please be sure to understand that these two examples is just showing you one of many MANY ways to add specificity to your selectors.

&quot;Is it that each id can have a class *related* to it and it doesn&#039;t matter if two unique id&#039;s both have related classes with the same name?&quot;

Um, I swear I&#039;m not trying to make this confusing but, this last question is both yes and no. I think the best way for me to attempt to make it a little more clear is to show you:

&lt;div id=&quot;primary rightsidebar&quot;&gt;&lt;/div&gt; = not valid, you can&#039;t have two id values in one attribute.

&lt;div id=&quot;primary&quot;&gt;&lt;/div&gt; = is valid.

&lt;div id=&quot;primary&quot; class=&quot;primary&quot;&gt;&lt;/div&gt; = is valid, but kinda silly and not necessary.

&lt;div id=&quot;primary&quot; class=&quot;rightsidebar&quot;&gt;&lt;/div&gt; = is valid.

&lt;div id=&quot;primary&quot; class=&quot;rightsidebar blue&quot;&gt;&lt;/div&gt; = is valid.

&lt;div id=&quot;primary&quot;&gt;
    &lt;div id=&quot;primary&quot; class=&quot;rightsidebar&quot;&gt;&lt;/div&gt;
&lt;/div&gt; = is not valid, only one unique &quot;primary&quot; id value per document.

&lt;div class=&quot;inner&quot;&gt;
     &lt;div class=&quot;inner&quot;&gt;&lt;/div&gt;
&lt;/div&gt; = is valid, you can have repeating class values per document.

So there are many combinations of class and id attributes you can use, but one contant remains, id values are unique per document and classes are not. Here are some combinations of valid and not valid selectors.

#primary.rightsidebar {} = valid
#primary .rightsidebar {} = valid
.rightsidebar#primary {} = valid
.rightsidebar #primary {} = valid
.rightsidebar .rightsidebar = valid
#primary.rightsidebar #primary = not valid
#primary .rightsidebar #primary = not valid

I hope this helps.</description>
		<content:encoded><![CDATA[<p>@Simon &#8211; </p>
<p>&#8220;If you have several entries named &#8220;.rightsidebar&#8221; in your style sheet, how would the browser know which one you are referring to?&#8221;</p>
<p>By using what is called specificty in your &#8220;entries&#8221; (<em>called selectors</em>). Lets say you have 4 variations of a right hand side bar, (<em>short, tall, blue and green</em>) you have a few options to add specificity here. One way would be to use additional classes next to this &#8220;.rightsidebar&#8221; class like so:</p>
<p>&lt;div class=&#8221;rightsidebar tall&#8221;&gt;&lt;/div&gt;<br />
&lt;div class=&#8221;rightsidebar short&#8221;&gt;&lt;/div&gt;<br />
&lt;div class=&#8221;rightsidebar blue&#8221;&gt;&lt;/div&gt;<br />
&lt;div class=&#8221;rightsidebar green&#8221;&gt;&lt;/div&gt;</p>
<p>and the css would be:</p>
<p>.rightsidebar {<br />
     border:1px solid #000;<br />
     margin:15px;<br />
     padding:15px;<br />
     width:200px;<br />
}<br />
.rightsidebar.tall { height:400px; }<br />
.rightsidebar.short { height:100px; }<br />
.rightsidebar.blue { background:#000099; }<br />
.rightsidebar.green { background:#00ff00; }</p>
<p>See how we have the .rightsidebar that has repeated styles then we use another class to add specificity to our selectors. Another method of adding specificity to a selector is to first select a unique parent and use it&#8217;s id or class in our selector.</p>
<p>&lt;div id=&#8221;primary&#8221;&gt;<br />
     &lt;div class=&#8221;rightsidebar&#8221;&gt;&lt;/div&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div id=&#8221;secondary&#8221;&gt;<br />
     &lt;div class=&#8221;rightsidebar&#8221;&gt;&lt;/div&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div id=&#8221;tertiary&#8221;&gt;<br />
     &lt;div class=&#8221;rightsidebar&#8221;&gt;&lt;/div&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div id=&#8221;footer&#8221;&gt;<br />
     &lt;div class=&#8221;rightsidebar&#8221;&gt;&lt;/div&gt;<br />
&lt;/div&gt;</p>
<p>.rightsidebar {<br />
     border:1px solid #000;<br />
     margin:15px;<br />
     padding:15px;<br />
     width:200px;<br />
}</p>
<p>#primary .rightsidebar { height:400px; }<br />
#secondary .rightsidebar { height:100px; }<br />
#tertiary .rightsidebar { background:#000099; }<br />
#footer .rightsidebar { background:#00ff00; }</p>
<p>So here we used parent element&#8217;s ids in our selectors to add specificity between the different variations of a &#8220;.rightsidebar&#8221; classed element. Please be sure to understand that these two examples is just showing you one of many MANY ways to add specificity to your selectors.</p>
<p>&#8220;Is it that each id can have a class *related* to it and it doesn&#8217;t matter if two unique id&#8217;s both have related classes with the same name?&#8221;</p>
<p>Um, I swear I&#8217;m not trying to make this confusing but, this last question is both yes and no. I think the best way for me to attempt to make it a little more clear is to show you:</p>
<p>&lt;div id=&#8221;primary rightsidebar&#8221;&gt;&lt;/div&gt; = not valid, you can&#8217;t have two id values in one attribute.</p>
<p>&lt;div id=&#8221;primary&#8221;&gt;&lt;/div&gt; = is valid.</p>
<p>&lt;div id=&#8221;primary&#8221; class=&#8221;primary&#8221;&gt;&lt;/div&gt; = is valid, but kinda silly and not necessary.</p>
<p>&lt;div id=&#8221;primary&#8221; class=&#8221;rightsidebar&#8221;&gt;&lt;/div&gt; = is valid.</p>
<p>&lt;div id=&#8221;primary&#8221; class=&#8221;rightsidebar blue&#8221;&gt;&lt;/div&gt; = is valid.</p>
<p>&lt;div id=&#8221;primary&#8221;&gt;<br />
    &lt;div id=&#8221;primary&#8221; class=&#8221;rightsidebar&#8221;&gt;&lt;/div&gt;<br />
&lt;/div&gt; = is not valid, only one unique &#8220;primary&#8221; id value per document.</p>
<p>&lt;div class=&#8221;inner&#8221;&gt;<br />
     &lt;div class=&#8221;inner&#8221;&gt;&lt;/div&gt;<br />
&lt;/div&gt; = is valid, you can have repeating class values per document.</p>
<p>So there are many combinations of class and id attributes you can use, but one contant remains, id values are unique per document and classes are not. Here are some combinations of valid and not valid selectors.</p>
<p>#primary.rightsidebar {} = valid<br />
#primary .rightsidebar {} = valid<br />
.rightsidebar#primary {} = valid<br />
.rightsidebar #primary {} = valid<br />
.rightsidebar .rightsidebar = valid<br />
#primary.rightsidebar #primary = not valid<br />
#primary .rightsidebar #primary = not valid</p>
<p>I hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-6255</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Tue, 04 Oct 2011 20:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-6255</guid>
		<description>Devin,

Still strugling sorry...

If you have several entries named &quot;.rightsidebar&quot; in your style sheet, how would the browser know which one you are referring to?

Is it that each id can have a class *related* to it and it doesn&#039;t matter if two unique id&#039;s both have related classes with the same name?

S</description>
		<content:encoded><![CDATA[<p>Devin,</p>
<p>Still strugling sorry&#8230;</p>
<p>If you have several entries named &#8220;.rightsidebar&#8221; in your style sheet, how would the browser know which one you are referring to?</p>
<p>Is it that each id can have a class *related* to it and it doesn&#8217;t matter if two unique id&#8217;s both have related classes with the same name?</p>
<p>S</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devin R. Olsen</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-6252</link>
		<dc:creator>Devin R. Olsen</dc:creator>
		<pubDate>Sun, 02 Oct 2011 16:28:13 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-6252</guid>
		<description>@Simon - you can use multiple id attributes to a single document, however its the value per id use that must be unique from one another. So, say I have three divs in my document with ids, in order for my document to be valid each id&#039;s value must be unique from one another.

Classes however do not need to have unique values across different elements to a single document. Say our three divs now have classes, each element could have the same class value if you desired and the document would be valid.

Other than the document not being valid anymore, about the worst thing that will happen with having repeated id values is that anyone who reads your code will assume you had no idea what you were doing.

I hope this clears it up for you. ids must have unique VALUES from one another on a single document, classes can have repeating VALUES to a single document.</description>
		<content:encoded><![CDATA[<p>@Simon &#8211; you can use multiple id attributes to a single document, however its the value per id use that must be unique from one another. So, say I have three divs in my document with ids, in order for my document to be valid each id&#8217;s value must be unique from one another.</p>
<p>Classes however do not need to have unique values across different elements to a single document. Say our three divs now have classes, each element could have the same class value if you desired and the document would be valid.</p>
<p>Other than the document not being valid anymore, about the worst thing that will happen with having repeated id values is that anyone who reads your code will assume you had no idea what you were doing.</p>
<p>I hope this clears it up for you. ids must have unique VALUES from one another on a single document, classes can have repeating VALUES to a single document.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-6251</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Sun, 02 Oct 2011 08:31:34 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-6251</guid>
		<description>Devin,

Your tutorials are excellent, thank you :-)

I think the penny is slowly dropping for me as regards CSS but I still have some fundamental issues...

You say: 

id=”&quot; (is for unique elements to and single html document)

class=”&quot; (is for non unique elements to and single html document)

I don&#039;t understand what is to stop you using one or the other repeatedly in any given scenario...? 

What would go wrong if you did use &quot;id=&quot; repeatedly throughout a document?

Thanks again for your help :-)

S</description>
		<content:encoded><![CDATA[<p>Devin,</p>
<p>Your tutorials are excellent, thank you :-)</p>
<p>I think the penny is slowly dropping for me as regards CSS but I still have some fundamental issues&#8230;</p>
<p>You say: </p>
<p>id=”&#8221; (is for unique elements to and single html document)</p>
<p>class=”&#8221; (is for non unique elements to and single html document)</p>
<p>I don&#8217;t understand what is to stop you using one or the other repeatedly in any given scenario&#8230;? </p>
<p>What would go wrong if you did use &#8220;id=&#8221; repeatedly throughout a document?</p>
<p>Thanks again for your help :-)</p>
<p>S</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learning The Basics of CSS Faster Than Ever &#124; TutorialMatrix.com</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-6001</link>
		<dc:creator>Learning The Basics of CSS Faster Than Ever &#124; TutorialMatrix.com</dc:creator>
		<pubDate>Tue, 02 Aug 2011 20:40:14 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-6001</guid>
		<description>[...] Website Address: http://www.devinrolsen.com/learning-the-basics-of-css/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Website Address: <a href="http://www.devinrolsen.com/learning-the-basics-of-css/" rel="nofollow">http://www.devinrolsen.com/learning-the-basics-of-css/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CSS Tutorials for Beginners &#124; Webpappa</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-4974</link>
		<dc:creator>CSS Tutorials for Beginners &#124; Webpappa</dc:creator>
		<pubDate>Fri, 04 Feb 2011 09:51:20 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-4974</guid>
		<description>[...] So you want to learn CSS huh? Well I can teach it but can you make it stick? My goal here today is to give a CSS beginner a basic understanding of not only how to use CSS but what it really is for. I will do my best to approach the idea of CSS from an entry-level user but I will do so in a matter of minutes&#8230; Read more [...]</description>
		<content:encoded><![CDATA[<p>[...] So you want to learn CSS huh? Well I can teach it but can you make it stick? My goal here today is to give a CSS beginner a basic understanding of not only how to use CSS but what it really is for. I will do my best to approach the idea of CSS from an entry-level user but I will do so in a matter of minutes&#8230; Read more [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dallas</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-2748</link>
		<dc:creator>Dallas</dc:creator>
		<pubDate>Tue, 19 Oct 2010 17:11:23 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-2748</guid>
		<description>Glad I found this tidbit on Google when I was surfing the web. Good STUFF!</description>
		<content:encoded><![CDATA[<p>Glad I found this tidbit on Google when I was surfing the web. Good STUFF!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nazir bhittani</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-2694</link>
		<dc:creator>nazir bhittani</dc:creator>
		<pubDate>Tue, 12 Oct 2010 23:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-2694</guid>
		<description>This site give me a lot about css .I study it regularly.</description>
		<content:encoded><![CDATA[<p>This site give me a lot about css .I study it regularly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: free style musci</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-1807</link>
		<dc:creator>free style musci</dc:creator>
		<pubDate>Wed, 09 Jun 2010 19:44:06 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-1807</guid>
		<description>I’m a huge fan of this site and I read it regularly. Keep up the good work!</description>
		<content:encoded><![CDATA[<p>I’m a huge fan of this site and I read it regularly. Keep up the good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Digian</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-1741</link>
		<dc:creator>Digian</dc:creator>
		<pubDate>Sun, 06 Jun 2010 10:13:25 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-1741</guid>
		<description>I wanted to thank you for this superb read surely enjoying every and every truly small bit of it and I have you bookmarked to look out new stuff you post.</description>
		<content:encoded><![CDATA[<p>I wanted to thank you for this superb read surely enjoying every and every truly small bit of it and I have you bookmarked to look out new stuff you post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shahbaz</title>
		<link>http://www.devinrolsen.com/learning-the-basics-of-css/#comment-1646</link>
		<dc:creator>Shahbaz</dc:creator>
		<pubDate>Sun, 30 May 2010 16:59:22 +0000</pubDate>
		<guid isPermaLink="false">http://devinrolsen.com/?p=61#comment-1646</guid>
		<description>Thanks a Lot for the tell all Basics

It Really Good Site For Basics!
Thanks u Sir

Thanks a Lot for your Tutorial!</description>
		<content:encoded><![CDATA[<p>Thanks a Lot for the tell all Basics</p>
<p>It Really Good Site For Basics!<br />
Thanks u Sir</p>
<p>Thanks a Lot for your Tutorial!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk

Served from: www.devinrolsen.com @ 2012-02-05 12:52:34 -->
