I am working with some existing code and there is a preloader which loads some images for the navigation rollover state. It looks like this:
<body onload="MM_preloadImages('Images/Home-over.png','Images/Signup-over.png','Images/Costs-over.png','Images/Team-over.png','Images/Process-over.png','Images/Scholarships-over.png','Images/Login-over.png','Images/FAQ-over.png','Images/Contact-over.png','Images/About-over.png')">
An example of one of the nav items using the above is below:
<div id="Layer-15" class="Contact" > <a href="contact.html"><img src="Images/Contact.png" alt="Contact" name="Contact" width="98" height="56" border="0" class="pngimg" id="Contact" onmouseover="MM_swapImage('Contact','','Images/Contact-over.png',1)" onmouseout="MM_swapImgRestore()" /></a></div>
Now all of the above is in the root folder.
When I go one folder deep, the nav breaks:
My code looks exactly the same as that posted above except that I prefix each reference to an image with ‘../’, e.g. ‘../Images/Home-over.png’ to send it back to the root folder first.
Unfortunately this does not work.
As nothing else is broken it seems to me that the images are not getting pre-loaded and this will most likely be because the image path is wrong.
However I’m not sure how it can be or how I go about figuring out the correct path?
All help is appreciated.
Thanks
The problem behind this was that the entire page code was getting duplicated due to a duplicate ‘includes’ statement in my php and this then prevented the styling of the nav bar.