Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    new to php, need help with navbar

    Hello-
    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!

  • #2
    Regular Coder
    Join Date
    Dec 2007
    Posts
    137
    Thanks
    1
    Thanked 21 Times in 21 Posts
    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.
    http://codex.wordpress.org/Dynamic_Menu_Highlighting

  • #3
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    This is a CSS problem, not PHP. But here you go, this should help.

    Code:
    <div class="rollover">
    <p>
    <a href="#"><img src="stuart.gif"
    width="32" height="32" border="0"></a>
    </p>
    </div>
    <style type="text/css">
    <!--
    .rollover a { display:block; width:32px; background-color: #FFFFFF}
    .rollover a:hover { background-color: #990000}
    -->
    </style>
    Rowsdower! has accused me of having mental problems, and the administrator allowed it. What a great forum huh?

  • #4
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks

    thanks for your help. I am still learning the boundaries of php coding!

  • #5
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    coding

    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.

  • #6
    Regular Coder
    Join Date
    Dec 2007
    Posts
    137
    Thanks
    1
    Thanked 21 Times in 21 Posts
    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.

    https://addons.mozilla.org/en-US/firefox/addon/60

    http://www.chromium.org/devtools

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


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •