How come the :before doesn't show anything when the content is empty, even though I set the height and width but when I enter some text in the content it shows that text?
CSS:
.a { background-color: cyan; height: 300px; width: 200px; margin-left: 50px; } .a:before { /* This is the one that I change */ content: "test"; margin-left: -10px; background-color: red; height: 10px; width: 10px; } HTML:
<div class="a"></div>