Need a 10x10 square with color fill. It seems to be doing everything right, but it is not displayed.
.top ul li:before { content: ""; background: #1b1b40; height: 10px; width: 10px; }
Need a 10x10 square with color fill. It seems to be doing everything right, but it is not displayed.
.top ul li:before { content: ""; background: #1b1b40; height: 10px; width: 10px; }
Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .
You need to add display: block;
or display: inline-block;
.top ul li:before { content: ""; background: #1b1b40; height: 10px; width: 10px; display: inline-block; }
<div class="top"> <ul> <li></li> </ul> </div>
Source: https://ru.stackoverflow.com/questions/549084/
All Articles