Change DIV Background using JavaScript
I currently have a web site in which I am using some Javascript to change the Background of a DIV.
The DIV is defined as follows :
<div id="outerscreen">
<div id="mainscreen">
</div>
</div>
and the Javascript I am using is as follows :
var docEl = document.getElementById('outerscreen'); docEl.style.backgroundImage = "url('pics/intro.gif')";
My problem arises where this function works perfectly on IE but fails for Chrome, FF and Safari.
Can anyone shed any light on what the problem is and how I might be able to resovle this.
Thanks in advance Chris
:confused:
http://www.frances-white.com/
firstly thank you for your cordial greeting, it is a pleasure to meet your acquaintance.
The website is here http://www.frances-white.com/ it works just dandy in IE, however when in Chrome or FF the image does not load.
Because i have a redirect on the URL it may be better seen here http://www.whitecoles.co.uk/lifecoaching/
The source code in question appears on line 12 - 13 or there abouts