<ul>
<li><div style="background-color: red; width: 10px; height: 10px; display: inline"></div>aaa</li>
<li>bbb</li>
<li>ccc</li>
</ul>
why in this example div is not visible? How can i add box with background-color in list?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
display: inlinewill not display unless it contains some kind of contents. You’d need to eitherdisplay: inline-block;or