PDA

View Full Version : HELP (bodyID and sprite navigation)



trav5567
Feb 23rd, 2012, 06:30 PM
I am trying to get my page indicators to work with the standard

<?php if ($thisPage=="Page_home") echo " id=\"currentpage\""; ?>.
I used a sprite image for my navigation and its different states but i cant seem to figure out the css to do so....Brain is dead.
If anyone could help me out that would be awesome:)

Here is the link (http://travismichael.net/new_tmdesigns/index.php#) to my page and what i am trying to do.

incase you don't trust my link;) http://travismichael.net/new_tmdesigns/index.php

SB65
Feb 23rd, 2012, 07:01 PM
I'm not sure whether you're asking about the sprites, or how to work with the id you've assigned to <body>. I'll assume the latter....

If you've applied an id of currentpage to your body element, and a class of home to the menu element for that page then your css needs to be:


#currentpage #navigation .home{...some different styling....}

This can be extended to cover other pages:


#currentpage #navigation .home, #aboutpage #navigation .about, #blogpage #navigation .blog{...some different styling....}

trav5567
Feb 23rd, 2012, 07:38 PM
Thanks for the reply.
Pretty sure id did what u mentioned right, but i still can't seem to get it to work.
just trying to get the home-page indicator to show right now ill worry about the other links afterward.

Really frustrating i can't believe im wasting pretty much this whole day trying to figure this out.

SB65
Feb 23rd, 2012, 07:46 PM
Despite your post above, your home page has an id of Page_home - not currentpage. Change either your css or the id you're setting on <body> and you'll be fine.

trav5567
Feb 23rd, 2012, 07:57 PM
Thank you sooo much! i cant believe i didnt even think about that.
i was putting #currentpage instead of using the actual pageId.
:)

see it working click link below
travismichael.net/new_tmdesign/index.php