?
Solved

Background Image appears in Firefox, but Not Safari - Any Clues

Posted on 2011-02-28
4
Medium Priority
?
311 Views
Last Modified: 2012-05-11
see: http://dev.himalayanacademy.com/new-dom.html

the header is set to this background image via CSS:

#header{
     height:107px;
      background-image: url('assets/img/masthead.jpg');
      background-repeat: no-repeat;
      }

Two problems:

1) it works in Firefox but not in Safari.  Odd. In Safari the div background is blank, empty, nada. Even in Fire fox sometimes it does not load. but if I click on the Web Developers "Edit CSS" as soon as I do that background image appears.

2)  typically I have noticed that images  that are applied to backgrounds in the CSS only render after the rest of the page has loaded. Is there anyway to fix that?

I am running an html5 embedded movie at the top of the page as a "performance" test.
0
Comment
Question by:Sivakatirswami
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 2000 total points
ID: 35003830
replace this url by
../assets/img/masthead.jpg

since it was looking inside the css folder
0
 

Author Comment

by:Sivakatirswami
ID: 35004037
Jai Ganesha! Duh...(foot in mouth!)

 I am usually good about using root relative paths

this works:

background-image: url('/assets/img/masthead.jpg');

Thanks...

0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 35004396
did my solution worked? Or is the problem still persisting? Please update
0
 

Author Comment

by:Sivakatirswami
ID: 35022335
Yes, it worked. I thought I had accepted your solution before... I did again, just now, Thanks Gurvinder.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
Suggested Courses
Course of the Month12 days, 5 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question