I am working on a responsive design and the class "bgMainpage" is having a background image but it is not showing on Safari on all the devices. I have applied background size cover as it is what the client wants. I have added browser specific CSS too and I am not sure what else to do so that it shows up in Safari too. Chrome, FF, IE show the image just fine. Any ideas ?
Project Link
CSS :
.bgMainpage{ background:url("../images/bg.jpg") no-repeat scroll right top #000000; -o-background-size: cover; -moz-background-size: cover; -webkit-background-size:cover; background-size: cover; }
Check what version of Safari your Mac uses. For earlier versions of Safari (versions 8 and below), go to Preferences and choose Appearance and then choose to Display images when the page opens.
Make sure the image path is set correctly in the background-image url. Once you have made sure that your CSS file is linked correctly, also check that the image itself is set correctly. Again, you will want to open your code inspector in the browser to check.
From the start page, click the Menu button from the bottom-right corner of the screen. Now, check the box next to the “Background Image” option. Here, you can scroll horizontally to see bundled background images. Click an image to instantly turn it into the start page's background image.
Safari has an apparent bug where it won't show some jpg/JPEG images of a certain type in backgrounds if some criteria are met. For online use there is a type of jpg image called Progressive JPEG. Regular jpg images encode the image data from top to bottom, and you can see them load that way online. Progressive JPEG, on the other hand, encodes the image in progressively higher detail. This means that it loads fuzzy at first and then gets clearer. Some people think this looks better online, which is why it's used. Some image optimizers will automatically make jpgs progressive for online use.
In my experience, Safari won't display jpgs when some of the following criteria are met:
I have not been able to recreate this in any browser except Safari.
To fix this, you can either re-save the image, making sure that it isn't in a progressive format (photoshop, etc have a selector for this), or use another format (gif, png, etc)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With