I’m trying to get a fixed width white <div> on a gray background (body), but everything is shown gray; the white is ignored. Code is on jsbin. Any ideas? I did this on previous websites, and there everything was peachy. I can’t see any difference with what I’m doing here.
PS: I had to write the jsbin URL down, and manually type it here, since Firefox refused to copy it from the share popup to the clipboard. This also worked previously 🙁
The floats are ruining it.It is caused by the floats 🙂
Basically
#containerdon’t have dimension because everything inside it are floated. No dimension = no background to appearAdding
overflow: autoto#containeris one way to solve the problem (depends on how you exactly want the whole layout to appear).