1 Replies - 5309 Views - Last Post: 14 March 2010 - 08:13 AM

#1 AUAN  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 30-July 09

Image rollovers with Dynamic Menu Highlighting

Posted 02 March 2010 - 07:46 PM

Hello all,

I have been trying to add some image rollovers to a currently working dynamic menu I am using. So far I have tried techniques with both CSS and Javascript inorder to insert rollover/hover images but none of it seems to be working.

If someone could have a look at my current code structure and suggest the best way possible integrate image rollovers on all the menu links that aren't active (the rollover would simply be the same as the active image).

The blog: http://www.georgehaj...ordpress/weblog

Menu code
<div id="nav">
    <ul class="menu">

     <a href="<?php bloginfo('siteurl'); ?>">
     <img src="<?php bloginfo('stylesheet_directory'); ?><?php if (is_page('Home')) {echo "/images/buttons/home_active.jpg";}else echo "/images/buttons/home_inactive.jpg" ?>" width="88" height="24" alt="home"/></a>

     <li class="spacer">
     <a href="http://www.georgehajian.co.nz/wordpress/weblog">
     <img src="<?php bloginfo('stylesheet_directory'); ?><?php if (is_home()) {echo "/images/buttons/weblog_active.jpg";}else echo "/images/buttons/weblog_inactive.jpg" ?>" width="115" height="23" alt="weblog"/></a>
 	 <li class="spacer">
     <a href="http://www.georgehajian.co.nz/wordpress/category/art">
     <img src="<?php bloginfo('stylesheet_directory'); ?><?php if (is_category('Art')) {echo "/images/buttons/art_active.jpg";}else echo "/images/buttons/art_inactive.jpg" ?>" height="23" alt="art"/></a></li>
     <li class="spacer">
     <a  href="http://www.georgehajian.co.nz/wordpress/resume"><img src="<?php bloginfo('stylesheet_directory'); ?><?php if (is_page('Resume')) {echo "/images/buttons/resume_active.jpg";}else echo "/images/buttons/resume_inactive.jpg" ?>" width="116" height="24" alt="resume"/></a>

This post has been edited by AUAN: 02 March 2010 - 07:58 PM

Is This A Good Question/Topic? 0
  • +

Replies To: Image rollovers with Dynamic Menu Highlighting

#2 calebjonasson  Icon User is offline

  • $bert = new DragonUnicorn(); $bert->rawr();
  • member icon

Reputation: 209
  • View blog
  • Posts: 989
  • Joined: 28-February 09

Re: Image rollovers with Dynamic Menu Highlighting

Posted 14 March 2010 - 08:13 AM

Wordpress can be a pain when working with images, I would just use this plugin and make your own CSS file http://wordpress.org...lugins/menubar/ . If you do not want to use it and plan on going your own way then I would simply recommend taking a look at how they use images.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1