I’m trying to put two spans in one container to achieve a background that spans across these two spans. I’ve made a jsfiddle example, see below
The problem is that the div doesn’t seem to span across these two, instead it lays on top of the two spans. If I set background to the two spans individually I get the gutter between them, which shouldn’t be visible. I’ve also tried to locate if the divs aren’t closed properly but to no avail.
Updated with less junk:
http://jsfiddle.net/hsEWG/5/
It is because of not clearing.
clearfixclears your issue!Just add a
clearfixclass to the.bgcolorblack. If you have menus coming out of thediv,overflow: hidden;will trim them.Fiddle: http://jsfiddle.net/hsEWG/6/
Generally TBS comes with
clearfixclass. But if you find it is not included, you can very well copy this to your CSS:Second fiddle updated: http://jsfiddle.net/hsEWG/7/
In case if you don’t need space, give the wrapper a class
span10. And in the CSS:Fiddle: http://jsfiddle.net/hsEWG/9/