7 Replies - 1501 Views - Last Post: 12 January 2012 - 09:45 AM

#1 L27   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 11-January 12

2 Backgrounds on one page via HTML?

Posted 11 January 2012 - 04:35 AM

Hi I'm sort of new to html and css so a fully explained answer would be great. (I know the basics you don't need to extremely dumb it down).

I want 2 backgrounds one behind, one in front I know this is possible via css but apparently only supports newer browsers. I really want as much browser support as possible for my site. So can this be done by html and support older browsers as well?

Thanks
Is This A Good Question/Topic? 0
  • +

Replies To: 2 Backgrounds on one page via HTML?

#2 Shane Hudson   User is offline

  • D.I.C Technophile
  • member icon

Reputation: 345
  • View blog
  • Posts: 1,286
  • Joined: 06-December 09

Re: 2 Backgrounds on one page via HTML?

Posted 11 January 2012 - 04:41 AM

To do it for older browsers you just need a div, in the place where you want the background. I much prefer multiple backgrounds in CSS but IE does have some trouble with them.
Was This Post Helpful? 0
  • +
  • -

#3 L27   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 11-January 12

Re: 2 Backgrounds on one page via HTML?

Posted 11 January 2012 - 04:50 AM

Do you think it's worth losing the old IE support for the css method?

Also how do I use this "div"?

thanks again!
Was This Post Helpful? 0
  • +
  • -

#4 revolutionx   User is offline

  • D.I.C Head

Reputation: 60
  • View blog
  • Posts: 229
  • Joined: 23-July 09

Re: 2 Backgrounds on one page via HTML?

Posted 11 January 2012 - 05:11 AM

Personally I think if its just a background image that they're losing it would be OK - as it's not main functionality.

http://www.css3.info...le-backgrounds/ This will work in modern browsers and IE9.

But it depends who views the site, and what percentage of them use old browsers.
Was This Post Helpful? 0
  • +
  • -

#5 L27   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 11-January 12

Re: 2 Backgrounds on one page via HTML?

Posted 11 January 2012 - 05:20 AM

View Postrevolutionx, on 11 January 2012 - 05:11 AM, said:

Personally I think if its just a background image that they're losing it would be OK - as it's not main functionality.

http://www.css3.info...le-backgrounds/ This will work in modern browsers and IE9.

But it depends who views the site, and what percentage of them use old browsers.


Only slight problem I see is surely it will lose the front background on an old IE? This is a problem because the front background is box where the content goes. If this is removed then the content will be on the background behind that and the text wont be very visible.

Is their a way to kind of send the first background forward? So if one background IS removed it will be the background furthest back.

thanks for the replys
Was This Post Helpful? 0
  • +
  • -

#6 L27   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 11-January 12

Re: 2 Backgrounds on one page via HTML?

Posted 12 January 2012 - 06:59 AM

Sorry to DP but I still can't find any solution for this, the CSS3 method isn't even working in IE 9. If any one has any advice please come forward and share.

My CSS looks like this.

body {background-image:url(images/main.gif), url(images/background.jpg); background-position:center, left; background-repeat:repeat-y, repeat; font-family: Verdana, Geneva, sans-serif;}


Works in Firefox and Chrome

thanks.
Was This Post Helpful? 0
  • +
  • -

#7 Shane Hudson   User is offline

  • D.I.C Technophile
  • member icon

Reputation: 345
  • View blog
  • Posts: 1,286
  • Joined: 06-December 09

Re: 2 Backgrounds on one page via HTML?

Posted 12 January 2012 - 08:19 AM

That is quite simply because IE9 does not support multiple backgrounds. IE 10 will do though AFAIK. I would recommend making it so it looks good enough in IE but better in the other browsers, unless the multiple backgrounds is very important.
Was This Post Helpful? 0
  • +
  • -

#8 L27   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 11-January 12

Re: 2 Backgrounds on one page via HTML?

Posted 12 January 2012 - 09:45 AM

View PostShane Hudson, on 12 January 2012 - 08:19 AM, said:

That is quite simply because IE9 does not support multiple backgrounds. IE 10 will do though AFAIK. I would recommend making it so it looks good enough in IE but better in the other browsers, unless the multiple backgrounds is very important.

Yes it is quite important for my site. It was built around having two backgrounds little did I know IE didn't have support.

I found this My link but there are no releases :/
As i said before any help would be amazing, do you have any suggestions?

thank you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1