Solved

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

Posted on 2011-02-28
4
266 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
  • 2
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 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:gurvinder372
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
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…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

706 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now