|
-
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
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks