Alec Smart Alec Smart - 3 years ago 156
CSS Question

CSS background-color has no effect on a DIV


Why does the background color not show as black? I cannot set the width and float, is it possible without them?

Thank you for your time.

Answer Source

Since the outer div only contains floated divs, it renders with 0 height. Either give it a height or set its overflow to hidden.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download