PDA

View Full Version : bkgrnd image i.e6 !!!


nits4u
12-13-2009, 06:20 PM
guys plz hlp me with fixing the backgroud image in I.E6...
it is o.k with rest of the explorers.....

link:
http://nits4u.110mb.com/history.html

gentleone
12-13-2009, 08:13 PM
background-attachment:fixed doesn't work in IE6 and under. There are some javascript based fixes for this like:
http://www.howtocreate.co.uk/fixedBackground.html

nits4u
12-15-2009, 07:52 AM
background-attachment:fixed doesn't work in IE6 and under. There are some javascript based fixes for this like:
http://www.howtocreate.co.uk/fixedBackground.html

thnx for your concern... but this it quite confusing for.
can u please hlp !!!

gentleone
12-15-2009, 09:50 AM
Well... there are also ways to do it CSS only. Check the following links:

This one use a conditional comment for IE6
http://webdesign.about.com/od/css3/f/blfaqbgsize.htm

This one works also in IE6 without separate styles for IE6
http://www.cssplay.co.uk/layouts/background.html

nits4u
12-16-2009, 05:21 AM
Well... there are also ways to do it CSS only. Check the following links:

This one use a conditional comment for IE6
http://webdesign.about.com/od/css3/f/blfaqbgsize.htm

This one works also in IE6 without separate styles for IE6
http://www.cssplay.co.uk/layouts/background.html

not possible in this case....
above styles wants the width and ht. on content should be exactly the same as of the bg. image. And this is not possible here, coz i have multiple divs in wrapper (where i want the bg. image)/////

Help........

gentleone
12-16-2009, 07:56 AM
not possible in this case....
above styles wants the width and ht. on content should be exactly the same as of the bg. image. And this is not possible here, coz i have multiple divs in wrapper (where i want the bg. image)/////
Then I'm not sure what you're after... I assumed that you wanted a bg image on the body, because that's what you normally should do. I don't get either what you mean with the multiple divs in wrapper where you want the bg image.
In Safari on the Mac I see that the height is not the same as the height of the bg image and in other browsers there might be also a difference.

nits4u
12-16-2009, 01:36 PM
i want the background image to the div:"wrapper", which is inside the body tag.
and inside wrapper i have different divs like "left menu", "main content"...

Corrosive
12-16-2009, 03:43 PM
So add the image to the wrapper using CSS.

Here is a guide to backgrounds; http://www.w3schools.com/css/css_background.asp

nits4u
12-17-2009, 11:57 AM
So add the image to the wrapper using CSS.

Here is a guide to backgrounds; http://www.w3schools.com/css/css_background.asp
haha.....
thnx Corrosive. but i think u dont read the problem properly !!!!
I already applied a backgroung image to the wrapper. But the prob. i that it is scrolling in I.E 6.
So i want to fix it for I.E6. In rest of the browsers it is fine.

Thanx.

Corrosive
12-17-2009, 12:14 PM
Position fixed just is not supported by IE6. You may have to code your way out of it using an IE6 specific stylesheet or accept that it is a limitation of a crappy browser!

gentleone
12-20-2009, 01:20 AM
Okay... lets sort this out for you.

I see that you made a #home div with your background image.
#home{
background:url(images/abt.gif);
background-repeat:no-repeat;
background-attachment:fixed;
}
That is the image that I see here on Safari.

I don't understand why you made a separate div for this background image before your #wrapper div and that's why this won't work in IE6, because IE6 sees a div with a background image that has/wants to scroll.

The solution for you IMOH is the following and this will work in IE6 too for sure:
body {
background: #333 url(images/abt.gif) no-repeat top left;
}

You can also give your body an ID if you want for another page a different background image like:
body #home {
background: #333 url(images/abt.gif) no-repeat top left;
}
body #anotherpage {
background: #333 url(images/anotherpage.gif) no-repeat top left;
}

I hope this helps!

gentleone
12-20-2009, 02:00 AM
Oops... sorry I totally missed the whole point of the post (sorry, just got back from the bar)... you can skip my 'IMOH solution' in the previous reply. This will scroll of course too.

In my REALLY opinion you just must use one of the links I send you earlier in this post, because the way you want it doesn't make sense. You want a background image on a div with 'background-image: fixed', but this is kind of silly to do so.