Background Image problem

Thread Solved

Join Date: Sep 2009
Posts: 67
Reputation: Kruptein is an unknown quantity at this point 
Solved Threads: 4
Kruptein's Avatar
Kruptein Kruptein is offline Offline
Junior Poster in Training

Background Image problem

 
0
  #1
Oct 11th, 2009
In my browser(opera), my background image takes up the full height off the screen, but on my friends(firefox) there appears a large black banner beneath it (black because that is the bgcolor)

I give you the css hopefully you guys can help me.

  1. body {
  2. color:#C00;
  3. background-color:#000;
  4. background-image:url('../background.jpg');
  5. background-repeat:no-repeat;
  6. background-position:top;
  7. height:100%;
  8. }
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 24
Reputation: Traevel is an unknown quantity at this point 
Solved Threads: 9
Traevel's Avatar
Traevel Traevel is offline Offline
Newbie Poster
 
0
  #2
Oct 11th, 2009
Hi there,

Could his screen perhaps be bigger?

You're using background-repeat:no-repeat; so perhaps his background ran out of image and showed the color black instead.

If you'd like to repeat the image vertically use background-repeat:repeat-y;
If that's not it, could you mention the size of the background image in pixels?

Good luck,

Traevel
6.5 When the answer cannot be put into words, neither can the question be put into words. The riddle does not exist. If a question can be framed at all, it is also possible to answer it. ~ Ludwig Wittgenstein
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 67
Reputation: Kruptein is an unknown quantity at this point 
Solved Threads: 4
Kruptein's Avatar
Kruptein Kruptein is offline Offline
Junior Poster in Training
 
0
  #3
Oct 11th, 2009
No I don't want the image to be vertically repeated because this would have a verry ugly effect (it's an image, not a pattern)
I want the image to be stretched vertically is this possible?

image = 1090x587
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 24
Reputation: Traevel is an unknown quantity at this point 
Solved Threads: 9
Traevel's Avatar
Traevel Traevel is offline Offline
Newbie Poster
 
0
  #4
Oct 11th, 2009
With a height of 587 it's not that weird to run out of image...

Stretching a background image is only supported in CSS3.

Perhaps this might help.

Traevel
6.5 When the answer cannot be put into words, neither can the question be put into words. The riddle does not exist. If a question can be framed at all, it is also possible to answer it. ~ Ludwig Wittgenstein
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 67
Reputation: Kruptein is an unknown quantity at this point 
Solved Threads: 4
Kruptein's Avatar
Kruptein Kruptein is offline Offline
Junior Poster in Training
 
0
  #5
Oct 11th, 2009
Yes i did that first, but it uses so many of my web speed, but I will give it a second try...
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 348
Reputation: Troy III will become famous soon enough Troy III will become famous soon enough 
Solved Threads: 42
Troy III's Avatar
Troy III Troy III is offline Offline
Posting Whiz
 
0
  #6
Oct 11th, 2009
Originally Posted by Kruptein View Post
In my browser(opera), my background image takes up the full height off the screen, but on my friends(firefox) there appears a large black banner beneath it (black because that is the bgcolor)

I give you the css hopefully you guys can help me.

  1. body {
  2. color:#C00;
  3. background-color:#000;
  4. background-image:url('../background.jpg');
  5. background-repeat:no-repeat;
  6. background-position:top;
  7. height:100%;
  8. }

this will make your background image to fill the available space of the document, in Opera Safari and IE5.5 and up...,but I can't help you with firefox. You'll need to hack it.
HTML and CSS Syntax (Toggle Plain Text)
  1. html, body {
  2. height: 100%; Width: 100%;
  3. margin: 0; padding: 0; border: 0;
  4. background-image: url(background.png);
  5. background-repeat: no-repeat;
  6. background-size: 100% 100%;
  7. -o-background-size: 100% 100%;
  8. -webkit-background-size: 100%;
  9. filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background.png',sizingMethod='scale');
  10. }
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster
 
0
  #7
Oct 20th, 2009
You are never going to exactly fill a screen with an image. There are too many differences in screen resolution, aspect ratio, and browser configurations among different computers for you to expect it to work.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC