Background image disappearing?

I have this defined in my style.css file:


#navigation {
	background-image: url('images/nav_bg.jpg');
	margin: auto;
	line-height: 43px;
}

I can call it successfully like this:


<div id="navigation">Left Right</div>

But when I try to use float (left/right) the background image disappears and turns white.

I want to float certain links to the left, and certain links to the right in this <div> tag. Is there a better way than to use float?

Thank you.

It’s not quite clear what’s going on here. Could you post more code, or create a page example where we could see this happening?

I want to float certain links to the left, and certain links to the right in this <div> tag.
Hi,
If you are wanting to float child elements in that div then you will need to force the #navigation to enclose it’s floats. Then your background image will become visible as the div extends.

To do that the easiest way is to set overflow:hidden on the parent.

#navigation {
overflow:hidden;
}

Ray, that did the trick. Thank you!