Why css is not working with this div?
So I have a body:
<body>
<div id="first">
<span class="red">This is a DIV Container</span>
Or
<br>
This
</div>
And I have a stylesheet with this
#first{
background-color:red;
}
But the background color does not change. I have no idea what I'm doing wrong ...
Here's jsfiddle with code
https://jsfiddle.net/fuz5uqfb/
Not worth it either.
+4
1 answer
You are using the wrong quotes for your div idand span class. It should be like this:
<body>
<div id="first">
<span class="red">This is a DIV Container</span>
Or
<br>
This
</div>
</body>
Updated Fiddle
+5