Jump to content


Photo
- - - - -

Text color in main nav in a sub page


  • Please log in to reply
14 replies to this topic

#1 ddave

ddave

    Member

  • Members
  • PipPip
  • 10 posts

Posted 03 April 2011 - 01:39 PM

Hi everyone,

I have a small problem with the customisation of background color in main navigation when i am on a page other as homepage.

Check this picture :

Please Login or Register to see this Hidden Content



The background menu selected stay in black grrr... (with the homepage the background menu come back to white when mouseout)

The more strange is on homepage i haven't this pb, but for each

Please Login or Register to see this Hidden Content

or

Please Login or Register to see this Hidden Content

it have this troubleshooting.

I am sure that it need to add something in custom CSS but i don't see wich lines to use...

Warm regards,
DDave

#2 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 03 April 2011 - 04:47 PM

This CSS should help for changing the background color from black to something else:

Please Login or Register to see this Hidden Content


Add the hex code for the color you desire.

for each

Please Login or Register to see this Hidden Content

or

Please Login or Register to see this Hidden Content

it have this troubleshooting.


Can you describe in detail what kind of troubleshooting you need to do? Is it a 404 error?

#3 ddave

ddave

    Member

  • Members
  • PipPip
  • 10 posts

Posted 03 April 2011 - 05:31 PM

Dear Catrina,

Thanks for your reply.
I think it's more complicated because i know use the CSS to change color background for li.page_item. (here i have put a white color).

The pb is why black background stay on all pages apart the homepage...

Look this picture :
(my homepage)
and compare to the first :

Please Login or Register to see this Hidden Content

( an another page)

On my homepage, i haven't this pb with background color, but when i am on an another page, the menu selected stay in black :'( (when i go into the submenu).

When i look firebug i see one different thing beetween the index and other pages in the main navagiation.

on home page, each page with subpages menu have a li class like that

Please Login or Register to see this Hidden Content

class

Please Login or Register to see this Hidden Content

in full code :

Please Login or Register to see this Hidden Content


BUT on other pages (ex : a subpage) it's not the same.

It's :

Please Login or Register to see this Hidden Content


I am not sure but the pb come from maybe to this class. I don't know how to remplace this class for others pages... or maybe just change something in CSS custom code about these class.

Warm regards,
DDave

#4 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 03 April 2011 - 05:41 PM

Ah, I missed the "current page item" bit. You can try adding this code so that the current page item background doesn't turn black in the subpages:

Please Login or Register to see this Hidden Content


Change

Please Login or Register to see this Hidden Content

to the color of your choice.

#5 ddave

ddave

    Member

  • Members
  • PipPip
  • 10 posts

Posted 03 April 2011 - 05:51 PM

Dear Catrina

I have tried your tips about ul.main-nav..., it works on homepage, but not for the others
:'( arrghhh ^^

The only other CSS custom codes that i used for the navigation is :

Please Login or Register to see this Hidden Content

}

Warm regards,
DD

#6 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 03 April 2011 - 06:00 PM

Can you post a live link to your site?

#7 ddave

ddave

    Member

  • Members
  • PipPip
  • 10 posts

Posted 03 April 2011 - 06:13 PM

Yes here. Warm regards, DD

#8 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 03 April 2011 - 06:39 PM

Hm, I'm not sure why the CSS provided above wouldn't work in the subpages. When I view your subpages, the "current item" background color remains white. Do you want it to be black instead?

#9 ddave

ddave

    Member

  • Members
  • PipPip
  • 10 posts

Posted 03 April 2011 - 06:48 PM

It remains white when you stay on homepage, but do you have done the test after you are going into an another page (like livres, a subpage..). In my web navigator (Chrome & Firefox) the current item stays black...

#10 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 03 April 2011 - 06:57 PM

The menu item remains black in the middle of page loading when I click on the subpage links. Is this what you're referring to?

#11 ddave

ddave

    Member

  • Members
  • PipPip
  • 10 posts

Posted 03 April 2011 - 07:17 PM

I refer to the current item background is black and normally it need to remais white, like when you are on homepage. Like you have see the current item background color remais white when you are on homepage like here : but unfortunaltly not when youre on other page (livre, into a subpage of the website, etc...) -->

Please Login or Register to see this Hidden Content

Warm regards, Damien

#12 kastelic

kastelic

    Advocate

  • Members

  • 3081 posts
  • Country: Country Flag

Posted 03 April 2011 - 09:50 PM

Hey, I can't see a link to your site.

#13 ddave

ddave

    Member

  • Members
  • PipPip
  • 10 posts

Posted 04 April 2011 - 07:55 AM

Dear Jimmy, Sorry, the website is under construction and i have put a coming soon page, so each time, i need to desactivate and re-activate when i want to show the website. So, if you want to take a look about the troubleshooting, i will put a link and desactivate the plugin. Regards, DDave

#14 Kate

Kate

    Advocate

  • Members
  • 3039 posts

Posted 04 April 2011 - 03:21 PM

Hey DDave, I believe the issue here is just declaring the right selector. Once you go to a subpage and still see the main item highlighted in black, check what the class of that main item (that's highlighted) is. It should be something like "current-page-ancestor". All you need to do add that class to the CSS Catrina gave you earlier. Make sense?

#15 ddave

ddave

    Member

  • Members
  • PipPip
  • 10 posts

Posted 04 April 2011 - 04:56 PM

Dear Kate,

Thanks for your advices. You and Catrina have give me the solution.

The pb was on two classes :

Please Login or Register to see this Hidden Content

and

Please Login or Register to see this Hidden Content

.

So the solution is to add two line in CSS custom :

Please Login or Register to see this Hidden Content

Please Login or Register to see this Hidden Content


I have try these options before but without the "a" element ... grrr!
It's always like that, you pass always so close of the solution and turn around during some hours.

Thanks to u and Catrina to spend your time on my troubleshooting.

Regards,
DDave