13 replies [Last post]
dddmx3
dddmx3's picture
Offline
Enthusiast
Battle Ground, WA
Last seen: 8 years 31 weeks ago
Battle Ground, WA
Timezone: GMT-8
Joined: 2010-11-15
Posts: 68
Points: 86

View this page.

When you click the "Home" button in the navigation, a green arrow should appear above it but it doesn't.
For every other navigation item, a green arrow comes up. Why doesn't the home one work? I've been trying to figure it out for a couple days and cant! Sad(

Visit my website:
www.RumorCo.com

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 50 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Because there's no

Because there's no .tab_active class on the home page link when you're on that page like there is with the others.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

dddmx3
dddmx3's picture
Offline
Enthusiast
Battle Ground, WA
Last seen: 8 years 31 weeks ago
Battle Ground, WA
Timezone: GMT-8
Joined: 2010-11-15
Posts: 68
Points: 86

I sure do! Line: 937 #tab_nav

I sure do!

Line: 937

#tab_nav .tab_active {
 
   background: url("../images/arrow_active.png") no-repeat;
   background-position: center top;
}

Unless, I dont understand what your trying to say?

I tried this, and it didnt work:

#tab_nav .tab_active li.home-link a:active {
 
    background: url("../images/arrow_active.png") no-repeat;
    background-position: center top;
}

It used to be:

#tab_nav li.home-link a:active {
 
    background: url("../images/arrow_active.png") no-repeat;
    background-position: center top;
}

Visit my website:
www.RumorCo.com

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 50 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Yeah, it's in your CSS but

Yeah, it's in your CSS but it's not in your HTML for the home link.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

dddmx3
dddmx3's picture
Offline
Enthusiast
Battle Ground, WA
Last seen: 8 years 31 weeks ago
Battle Ground, WA
Timezone: GMT-8
Joined: 2010-11-15
Posts: 68
Points: 86

What do you mean it's not in

What do you mean it's not in my html?
it's in my php?

<li class="home-link"><a href="<?php echo '' . HTTP_SERVER . DIR_WS_CATALOG;?>"><?php echo TOP_MENU_HOME;?></a></li>

And for css, should it be:

#tab_nav li.home-link a:active {
 
    background: url("../images/arrow_active.png") no-repeat;
    background-position: center top;
}

OR

#tab_nav .tab_active li.home-link a:active {
 
    background: url("../images/arrow_active.png") no-repeat;
    background-position: center top;
}

Visit my website:
www.RumorCo.com

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 50 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Neither of those. The first

Neither of those. The first one only applies when the link is actually being clicked and the second one doesn't exist in your HTML as you don't have .home-link as a child of .tab_active. The arrow is only applied to anchors inside list items that have a class of .tab_active. <li class="home-link"> does NOT have a class of .tab_active on it, i.e. on the home page, you need to make the HTML for your home link <li class="home-link tab_active">

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

dddmx3
dddmx3's picture
Offline
Enthusiast
Battle Ground, WA
Last seen: 8 years 31 weeks ago
Battle Ground, WA
Timezone: GMT-8
Joined: 2010-11-15
Posts: 68
Points: 86

Download the file here, if

Download the file here, if you say it isn't a child item, point it out in this file, and then I'll be able to fix it.

To download it, Right-click and select "Save target as" or "Save link as"

Visit my website:
www.RumorCo.com

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 50 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

I've already told you what you need to do

When you're on the home page, the list item around your home page link needs to look like:
<li class="home-link tab_active">

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

dddmx3
dddmx3's picture
Offline
Enthusiast
Battle Ground, WA
Last seen: 8 years 31 weeks ago
Battle Ground, WA
Timezone: GMT-8
Joined: 2010-11-15
Posts: 68
Points: 86

Thank you so much!

Wokred, but we got a problem. Now, the home always stays active, Why?!

Visit my website:
www.RumorCo.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 37 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

That is likely a scripting

That is likely a scripting issue and you'll need to look at how your php script is doing things, the other links work, adding and removing the tab_active so compare them in the script to the home page link.

Unless you simply hard coded 'tab_active' in the markup of course.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

dddmx3
dddmx3's picture
Offline
Enthusiast
Battle Ground, WA
Last seen: 8 years 31 weeks ago
Battle Ground, WA
Timezone: GMT-8
Joined: 2010-11-15
Posts: 68
Points: 86

I don't know. All the menu

I don't know. All the menu items are in tpl_top_nav.php so If I don't have something right in there, that's probably my problem?

Visit my website:
www.RumorCo.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 37 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Erm yes? did you in fact hard

Erm yes? did you in fact hard code the 'home' link? Is it in fact outside of what ever Drupal provides for dynamic nav elements

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

dddmx3
dddmx3's picture
Offline
Enthusiast
Battle Ground, WA
Last seen: 8 years 31 weeks ago
Battle Ground, WA
Timezone: GMT-8
Joined: 2010-11-15
Posts: 68
Points: 86

It is zen cart, I have a

It is zen cart, I have a search tool where I can search anything in any file, what should I search for? maybe it will give me some leads? maybe tab_active?

Visit my website:
www.RumorCo.com

dddmx3
dddmx3's picture
Offline
Enthusiast
Battle Ground, WA
Last seen: 8 years 31 weeks ago
Battle Ground, WA
Timezone: GMT-8
Joined: 2010-11-15
Posts: 68
Points: 86

Fixed it.

Fixed it. Big smile

Visit my website:
www.RumorCo.com