When I go to browser to see the page it’s showing nothing. Also there is no error.
HTML file name: flag.html
CSS file name: flag.css
.red {
background: red !important;
}
.blue {
background-color: blue;
}
.green {
background-color: green;
}
<div class="red"></div>
<div class="blue"></div>
<div class="green"></div>
2
Answers
I believe the problem is that the div you are defining have no content in it (basically the div is empty)
So, you can either add content or specify the height and width of the div
simply you need to add a
height
andwidth
to yourdiv
tags ,because by default they are just an empty tags with a 0height
andwidth