Floats are removed from the flow which means that a parent element that contains only floats will in fact contain nothing and its height will be zero.
You need to contain the floats which is usually accomplished by using a containing mechanism on the parent (such as overflow:hidden) or adding an element after the float and applying clear:both to it (see clearfix).
If you don't need visible overflow then just apply overflow:hidden to .width.
('width' is a bad naming convention and wrapper,outer or container would be better.)
(You should also use a full doctype to stop triggering quirks mode and upsetting the standard behaviour. All pages should have a current valid doctype).