I have used a p tag inside a div tag:
div{background-color:#3B3B3B;}
p{float:left;}
The background-color
of div does not appear in the image:
How to solve this?
Using float on a child will cause the parent to collapse. There are many alternative solutions, see How do you keep parents of floated elements from collapsing?
English