April 28, 2011
Background not visible due to positioning
Question by dragonfly
The background color of <ol
> list is not displayed properly. This problem started after I floated label left and input right. How to fix this. The expected result is:
Here is my result: http://fiddle.jshell.net/WZ3nM/1/
Similarly I’ve problem with the div .wrapper
. The shadow should be way below the content and there should be a white color background beneath <div class=.col-2>
.
Answer by Elliott
I modified your code and added a third <li> with the following style:
clear:both;
Your float was taking elements out of the document flow and this the background color didn’t know where to end.
Hope that helps.