WordPress.org

Forums

PHP and DHTML menus (1 post)

  1. peiqinglong
    Member
    Posted 8 years ago #

    Ok, this is a WordPress, PHP, DHTML menu question.

    So here is my present code (skimmed down for easy reading):

    [code]
    <li<?php if (is_home()) {echo " id\"current\""; } ?>>Home
    <li<?php if (is_page(car)) {echo " id\"current\""; } ?>>Car
    [/code]

    So the problem I'm having is that when a person clicks, lets say Car, it puts a border-bottom under it (which is what I want), but when a person goes to a sub page under that main link, the border-bottom disappears. Is there a way to make it so that no matter what sub page under a main page is selected, the border-bottom will always appear under the main page?

    Here is another example:

    Main Page -->
    [url]http://dev.abunchofcars.com/featuredride/[/url]

    Sub Page of the Main Page --> [url]http://dev.abunchofcars.com/featuredride/rich_cl/[/url]

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.