CSS Code
Does anyone know how I can change one section of code in CSS without it affecting another part? If you enter the code into the playground, you can see my problem. This is homework of my class and I am stuck. Thanks in advance to anyone who can help. <div> <h3 id='id1'>Red text header with a blue border!</h1> <p class="class1">This paragraph should have a black background and yellow text</p> <span class="class1">Black background and white text.</span> <span>Blue background and white text.</span> </div> <div> <h3>Red text header with red border!</h3> <p>Green text with white background color</p> <p id="id2">Green text, white background color, dashed purple border</p> </div> /* Your code here: */ h3.{color: red; background: blue; } .p {color: yellow; background: black; } span {color: white; background: blue; } p.class1 {color: yellow; background: black; } .class1 {color: white; background: black; } .id1 {color: green; background: white } #id2 {color: green; background: white; border: purple dashed }