css subclass

/* CSS */
.title {  color #f00000;} 

// New subclass called “title-large”
.title-large {  font-size: 2rem;}

/* HTML implementation
<span class=”title title-large”>
*/

// New subclass called “title-small”
.title-small {  font-size: .5rem;}

/* HTML implementation
<span class=”title title-small”> */

0
0
Awgiedawgie 440215 points

                                    &lt;div class=&quot;area1&quot;&gt;
    &lt;table&gt;
        &lt;tr&gt;
            &lt;td class=&quot;item&quot;&gt;Text Text Text&lt;/td&gt;
            &lt;td class=&quot;item&quot;&gt;Text Text Text&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;area2&quot;&gt; 
    &lt;table&gt;
        &lt;tr&gt;
            &lt;td class=&quot;item&quot;&gt;Text Text Text&lt;/td&gt;
            &lt;td class=&quot;item&quot;&gt;Text Text Text&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
&lt;/div&gt;

&lt;style&gt;

	.area1
{
    border:1px solid black;
}
.area1.item
{
    color:red;
}
.area2
{
    border:1px solid blue;
}
.area2.item
{
    color:blue;
}

&lt;/style&gt;

0
0
Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source