So I'm trying to get the images to load when the page loads not when they are moused over.
At the moment I'm using this code.
<ul id="nav"> <li id="home"><a href="index.html"></a></li> <li id="news"><a href="news.html"></a></li> <li id="forum"><a href="forum"></a></li> <li id="media"><a href="media.html"></a></li> <li id="download"><a href="downloads.html"></a></li> <li id="contact"><a href="contact.html"></a></li> <li id="about"><a href="about.html"></a></li> <li id="donation"><a href="donations.html"></a></li> </ul>
Then this in the CSS
#nav {margin: 0;
padding: 0;
z-index: 30;
}
#nav li {margin: 0;
padding: 0;
list-style: none;
float: left;
z-index: 30;
}
#nav li a
{display: block;
width:120px;
height:40px;
margin: 0 0 0 0;
padding: 0px;
z-index: 30;
}
#home a {background:url(images/home.gif) no-repeat ;}
#home a:hover{background:url(images/homeb.gif) no-repeat;}
#news a {background:url(images/news.gif) no-repeat ;}
#news a:hover{background:url(images/newsb.gif) no-repeat;}
#forum a {background:url(images/forum.gif) no-repeat ;}
#forum a:hover{background:url(images/forumb.gif) no-repeat;}
#media a {background:url(images/media.gif) no-repeat ;}
#media a:hover{background:url(images/mediab.gif) no-repeat;}
#download a {background:url(images/downloads.gif) no-repeat ;}
#download a:hover{background:url(images/downloadsb.gif) no-repeat;}
#contact a {background:url(images/contact.gif) no-repeat ;}
#contact a:hover{background:url(images/contactb.gif) no-repeat;}
#about a {background:url(images/about.gif) no-repeat ;}
#about a:hover{background:url(images/aboutb.gif) no-repeat;}
#donation a {background:url(images/donations.gif) no-repeat ;}
#donation a:hover{background:url(images/donationsb.gif) no-repeat;}
Can anyone help me display the images when the page first loads.
Maybe by putting them on the page and then hiding them?
thanks

New Topic/Question
Reply


MultiQuote





|