<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shahid khan</title>
    <description>The latest articles on DEV Community by Shahid khan (@shahidnsu).</description>
    <link>https://dev.to/shahidnsu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F37759%2F3ac600c2-2e27-45fc-b5f3-41a4462ea92f.jpeg</url>
      <title>DEV Community: Shahid khan</title>
      <link>https://dev.to/shahidnsu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shahidnsu"/>
    <language>en</language>
    <item>
      <title>Learn CSS selectors using picture(Direct child selector)</title>
      <dc:creator>Shahid khan</dc:creator>
      <pubDate>Sun, 28 Aug 2022 11:51:36 +0000</pubDate>
      <link>https://dev.to/shahidnsu/learn-css-selectors-using-picturedirect-child-selector-2bgj</link>
      <guid>https://dev.to/shahidnsu/learn-css-selectors-using-picturedirect-child-selector-2bgj</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pEQwVAPS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pmc32vcdvut5ijn76usl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pEQwVAPS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pmc32vcdvut5ijn76usl.png" alt="Learn CSS selectors using picture(Direct child selector)" width="880" height="795"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>css</category>
      <category>html</category>
    </item>
    <item>
      <title>CSS selector explained using a picture(Descendant selectors)</title>
      <dc:creator>Shahid khan</dc:creator>
      <pubDate>Sun, 28 Aug 2022 11:02:58 +0000</pubDate>
      <link>https://dev.to/shahidnsu/css-selector-explained-using-a-picturedescendant-selectors-10d8</link>
      <guid>https://dev.to/shahidnsu/css-selector-explained-using-a-picturedescendant-selectors-10d8</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bki7wMBz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wwx2ocmalz4mskrwp50s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bki7wMBz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wwx2ocmalz4mskrwp50s.png" alt="CSS selector explained using a picture(Descendant selectors)" width="880" height="1082"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>css</category>
    </item>
    <item>
      <title>CSS selector in depth(compound class selector)</title>
      <dc:creator>Shahid khan</dc:creator>
      <pubDate>Sat, 27 Aug 2022 06:04:48 +0000</pubDate>
      <link>https://dev.to/shahidnsu/css-selector-in-depthcompound-class-selector-4476</link>
      <guid>https://dev.to/shahidnsu/css-selector-in-depthcompound-class-selector-4476</guid>
      <description>&lt;p&gt;We all know about the class, id ,type and universal selector. In this article we learn about the more advanced css selector.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compound Class selector
&lt;/h2&gt;

&lt;p&gt;let’s create one html and one css file and link the the html file to the css. Write this code for understanding the compound class selector.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    &amp;lt;meta charset="UTF-8" /&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1" /&amp;gt;
    &amp;lt;link href="selector.css" rel="stylesheet" /&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;!--Compound class selector--&amp;gt;
    &amp;lt;div class="box red"&amp;gt;Box-1&amp;lt;/div&amp;gt;
    &amp;lt;div class="box yellow"&amp;gt;Box-2&amp;lt;/div&amp;gt;
    &amp;lt;div class="circle yellow"&amp;gt;Box-3&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box {
  height: 100px;
  color: red;
}
.circle {
  height: 200px;
  color: green;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now if you want to select the second div for styling. There is problem.If apply our style using class selector box then first and second both get selected.If you apply style using yellow last two div gets selected. To only select the middle div element we need to use the compound class selector.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZRG2B7rt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqsvtvm6yo275utdxo7l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZRG2B7rt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqsvtvm6yo275utdxo7l.png" alt="Table to understand the compound class selector" width="689" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There is no space between each of .class portions of the compound selectors.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now style our second div using compound class selector.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box.yellow {
 color:purple;
 height : 200px;

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s see the output of our code.&lt;/p&gt;

&lt;p&gt;second div content became purple.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZjubtVm6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/phg3b2eved2omwz0r3nx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZjubtVm6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/phg3b2eved2omwz0r3nx.png" alt="html output" width="424" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
