...

View Full Version : Navigation With images and php



CoolAsCarlito
12-03-2010, 12:18 AM
I have an interesting question here. Below is my html of my navigation menu however I'm setting up something in my database which has some good stuff in it and I"m trying to figure out how to implement it all so that the images, links, and everything will still work properly. This will probably take some thinking and I can't come up with a way to do this while still being able to have the images appear right.



<div id="navigation">

<img id="navigation" src="images/navigation.jpg" alt="Navigation" />

<a href="applications.php"><img class="links" src="images/applications1.jpg" alt="Applications" onmouseover="this.src = 'images/applications2.jpg'" onmouseout="this.src = 'images/applications1.jpg'" /></a>

<a href="#"><img class="links" src="images/rules1.jpg" alt="Rules" onmouseover="this.src = 'images/rules2.jpg'" onmouseout="this.src = 'images/rules1.jpg'" /></a>

<a href="#"><img class="links" src="images/history1.jpg" alt="History" onmouseover="this.src = 'images/history2.jpg'" onmouseout="this.src = 'images/history1.jpg'" /></a>

<a href="#"><img class="links" src="images/frontoffice1.jpg" alt="Front Office" onmouseover="this.src = 'images/frontoffice2.jpg'" onmouseout="this.src = 'images/frontoffice1.jpg'" /></a>

<a href="#"><img class="links" src="images/forums1.jpg" alt="Forums" onmouseover="this.src = 'images/forums2.jpg'" onmouseout="this.src = 'images/forums1.jpg'" /></a>

<a href="#"><img class="links" src="images/roster1.jpg" alt="Roster" onmouseover="this.src = 'images/roster2.jpg'" onmouseout="this.src = 'images/roster1.jpg'" /></a>

<a href="#"><img class="links" src="images/halloffame1.jpg" alt="Hall of Fame" onmouseover="this.src = 'images/halloffame2.jpg'" onmouseout="this.src = 'images/halloffame1.jpg'" /></a>

<a href="#"><img class="links" src="images/backstage1.jpg" alt="Backstage" onmouseover="this.src = 'images/backstage2.jpg'" onmouseout="this.src = 'images/backstage1.jpg'" /></a>

</div> <!-- End of navigation div -->


Database Table - Menus
fields- id, menuname

Database Table - Menu Items
fields - id, menu_id, contentpage_id, itemname, itemurl, itemorder

BulletTimeBill
12-03-2010, 09:57 AM
Umm, what is the question? Questions normally end in question marks :P I don't understand how databases are going to effect your nav menu. But that being as unhelpful as it is, i mostly wanted to post so I could tell you not to use your menu in that way. Use css hover classes instead. Also if those images are just basic nav images consider using png instead of jpeg.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum