PDA

View Full Version : div background not showing



crittle1
January 19th, 2008, 11:21 AM
hi, I just started a site and I'm having some trouble. I'm new to css here.

I'm using dreamweaver and adding div tags to the page. I can preview my page in any browser via dreamweaver CS3 and the background of the div tags work properly, but when I tried to test it online the backgrounds don't show in any browser.

It's div tag id "band" and "footer" at the bottom. They are just two tags w/ two different repeating background patterns. (I have yet to clean up the html. I'm going to do that later. )
I've read something about floating the div tag?!?

Thanks

crittle1
January 19th, 2008, 07:03 PM
UPDATE: I figured it out. I put float to "none" and added the width to auto and added height. It worked for me.

thanks anyhow!

Icy Penguin
January 19th, 2008, 09:01 PM
For a background to work on a div, I think you have to always have a height - divs are automatically 100% width of their parent, but have no default height (I think). So, as soon as you put that height on, the background works.