Solved

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

Posted on 2011-02-28
4
300 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:
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

733 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