css background image problem
For some reason in firefox the backgroundimage for my div #container dos not show up but it works fine in ie
here is the page in question http://darkscripts.111mb.com/darkscriptsindex.htm
hope you can help me
For some reason in firefox the backgroundimage for my div #container dos not show up but it works fine in ie
here is the page in question http://darkscripts.111mb.com/darkscriptsindex.htm
hope you can help me
SearchBliss posted this at 22:14 — 8th September 2005.
He has: 267 posts
Joined: Feb 2005
I use IE, but you may want to try this:
#container {
background-image: url(bg.jpg);
margin: 0 auto;
width: 720px;
}
and see if that works. Just a guess.
demonhale posted this at 01:29 — 9th September 2005.
He has: 3,278 posts
Joined: May 2005
the problem here is that you floated the div.content-container and div.banner-container which holds inside their div class your texts... wherein the both of them is handled inside a div id #container... The quick fix I could think of is this...
but if I were you you should delete the float and absolute position your navigation so that the Background in the container stretches as your content increases... depends on you...
Roo posted this at 04:45 — 9th September 2005.
She has: 840 posts
Joined: Apr 1999
Try validating your code:
Your code errors
Also try quote marks like this:
#container {
background: url('bg.jpg');
margin: 0 auto;
width: 720px;
}
Roo
baldrick posted this at 18:24 — 9th September 2005.
He has: 388 posts
Joined: Apr 2005
Thanks demonhale that fixed it right up.
baldrick posted this at 13:36 — 10th September 2005.
He has: 388 posts
Joined: Apr 2005
deamonhale your suggestion did fix it but then i had to manuly enter the hight of each page. I did some research on this and found somthing out if you have a floated div within a container and the container wont surround your floated div all you have to do is add overflow: auto to the container and it works.
just incase anyone else comes upon this problem
baldrick posted this at 15:22 — 10th September 2005.
He has: 388 posts
Joined: Apr 2005
here is the article about it http://www.quirksmode.org/css/clearing.html
demonhale posted this at 15:24 — 10th September 2005.
He has: 3,278 posts
Joined: May 2005
thats why I told you it was just a quick fix... I usually do not use float tags... But I still pointed out that you have contained a floating element inside your container thats why you had that problem...
I guess I was thinking youll be using different page lengths and want complete control of it... Yes defenitely an overflow:auto; would work in this case...
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.