View Full Version : new to php, need help with navbar

03-13-2010, 08:50 PM
I am relatively new to php and I have created a wordpress site (which uses php functionality). The site in question is http://www.heyrubecircus.com/
I wanted my navbar to be rollover images, so I deleted the default navbar and tried my hand at coding it. I'm doing the traditional html coding for this but it is not working. The images are showing up, but the functionality is shot. For the meantime, I've set the default images so that the "home" button appears to be "on" at all times.
Do I need to go about this a different way?
Any help is appreciated!

03-13-2010, 11:56 PM
I have not done Wordpress customizing in a long time, but usually it's either a combination of PHP and CSS issues.

Maybe this article will help. It talks about making a highlighted navbar menu for Wordpress, showing the necessary PHP and CSS, like detecting which page you are on via PHP and then highlighting your navbar via CSS.

03-14-2010, 12:03 AM
This is a CSS problem, not PHP. But here you go, this should help.

<div class="rollover">
<a href="#"><img src="stuart.gif"
width="32" height="32" border="0"></a>

<style type="text/css">
.rollover a { display:block; width:32px; background-color: #FFFFFF}
.rollover a:hover { background-color: #990000}

03-14-2010, 10:37 PM
thanks for your help. I am still learning the boundaries of php coding!

03-14-2010, 10:56 PM
ok, so that helped half the problem. The issue is that in my css, I've specified all links to have certain styling. So if I just put the navbar image/links in a div called rollover, the link styling is still applied.

03-15-2010, 09:54 PM
If it's a CSS issue, then you could use Firefox Web developer tools add-on or use Google Chrome browser with the built-in developer tools.

Both will allow you to analyze the CSS of a page, letting you turn on and off stylings and show what divs are being controlled by what style.

It may help you pinpoint the problem in your CSS.



Some nice videos showing you how to use the Google Chrome dev tools on the above link.