Skip navigation
skronwith
Currently Being Moderated

background shows on computers, not on all devices

Aug 7, 2012 7:35 PM

In my web site created by DreamWeaver CS3 I have this in an external css file:

 

#maincontent p {

          font-size:2.5em;

          font-weight:bold;

          margin-top: 70px;

          background-image: url(Images/background.jpg);

 

 

This background image is just a solid block of color with 50% transparency created in photoshop and saved as a jpg.

 

I also have in this file a body tag with  a background image of a group of babies:

 

body {

          background-image: url(Images/babies.jpg);

          background-repeat: repeat;

}

 

 

Now the problem.  When I look at the web page on the net (it's live), each page shows correctly the background image, the babies,  and the paragraph with the semi-transparent background color correctly (the babies show through partially the background color).  However, on the ipad and iphone, the background color for the paragraph doesn't exist, all I have is the text against the babies.  Even if I make the transparency 100%, no change.  This occurs on every browser I have tried on the ipad and iphone.  What is it about these devices that makes them disregard this background?  Thanks.

 
Replies
  • Currently Being Moderated
    Aug 8, 2012 12:04 AM   in reply to skronwith

    skronwith wrote:

     

    When I look at the web page on the net (it's live),

    Unless you give people the link to the site, you're simply asking others to guess what the problem might be.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 5:32 AM   in reply to skronwith

    Try a PNG rather than JPG.

     

    PNGs can have transparency.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 5:39 AM   in reply to Jon Fritz II

    Bear in mind that while a JPG can have 32 x 10^6 colors, a PNG can only have 256.  If your image has texture or is a photo-quality image, then you may experience some degradation of quality.  In addition, the PNG and the JPG compression algorithms are vastly different, and you may also find the resulting PNG to be significantly larger than the corresponding JPG.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 5:46 AM   in reply to MurraySummers

    That is true with PNG 8.

     

    I guess I only use PNG 24 these days and the color depth is not noticably different between it and a JPG.

     

    The file size is considerably different though. On a 1000px wide image test, the JPG is 392KB and the same PNG is 1.55MB.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 5:48 AM   in reply to Jon Fritz II

    You can obtain transparency using CSS, though it isn't supported in all browsers.

     

    add in

     

    opacity:.5;

     

    to your CSS for the image and it will go to 50% transparent, no matter the file type (as long as it's a web file, which .PSD is not).

     

    1 is 100%

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points