Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-20-2011, 02:41 AM   PM User | #1
jaiesh_bhai
New to the CF scene

 
Join Date: Jul 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
jaiesh_bhai is an unknown quantity at this point
Background Image Problem

I cannot seem to get the background image to work for Firefox like it does for chrome and IE. Anyone know why this happens?

Website: lidoscolumbus.com
jaiesh_bhai is offline   Reply With Quote
Old 07-20-2011, 05:18 AM   PM User | #2
djh101
Regular Coder

 
djh101's Avatar
 
Join Date: May 2009
Location: Santa Clarita
Posts: 603
Thanks: 48
Thanked 63 Times in 63 Posts
djh101 is an unknown quantity at this point
For future reference, add http:// in front of your URL or use the link tags so that it is clickable (much easier to access).

background-size is a newer property that is not supported in older versions of Firefox. In other words, you can't have a variable sized background image. However, it is possible to simulate a background image with a fixed, z-indexed image. Something like the following:

HTML:
Code:
<div id="my-bkg-img"><img src="http://2.bp.blogspot.com/-03LnaUK9Ud8/TcZC3knAoZI/AAAAAAAAAxc/QRm7Pp5cx-o/s400/Penguins.jpg" id="my-bkg-img" /></div>
CSS:
Code:
#my-bkg-img {
height: 100%;
width: 100%;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: -1;
}
__________________
"Yeah science!"
Online Science Tools
djh101 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:34 AM.


Advertisement
Log in to turn off these ads.