- This topic is empty.
-
AuthorPosts
-
June 11, 2009 at 1:13 pm #25128spate1yMember
Hi there!
I am making a site theme similar to CSS Tricks. I need help with active links in the menu. How do I make it so that when someone is viewing articles blog page and/or article post the article tab is selected. I need the same thing for my site’s home, videos, and forums tab.
June 11, 2009 at 1:44 pm #58984apostropheParticipantAre you using wp_list_pages to generate your menu?
June 11, 2009 at 2:00 pm #58987spate1yMemberNo sir. Is there any option of doing it without having to use the php wp list page command?
June 11, 2009 at 2:37 pm #58994apostropheParticipantJune 11, 2009 at 2:41 pm #58995spate1yMemberWell the problem is, these are not static pages…
Home – (same as Articles)
Articles – Blog Page for all my post
Videos – Blog Page for all my videos
Forums – external link to phpBB forumsMy menu is the exact same as CSS Tricks (except it doesn’t have downloads). How is Chris doing it at this site?
June 11, 2009 at 2:59 pm #58996apostropheParticipantWhy don’t you have a look?
June 11, 2009 at 3:03 pm #58997spate1yMemberSo he is using div classes:
body#home #mainNav li.articles a,
body#downloads #mainNav li.downloads a,
body#video-screencasts #mainNav li.videos a,
body#contact #mainNav li.contact a,
body#forums #mainNav li.forums a { background: white; color: #2f2626; }Could you please explain this line to me: body#video-screencasts #mainNav li.videos a,
I think I understand what is going on but I just want to make sure.
June 11, 2009 at 3:21 pm #58999spate1yMemberFor some reason when I integrate the same code into my site and change settings to match it. Nothing happens. Any ideas?
By the way, thanks for responding to my post(s).
June 11, 2009 at 6:13 pm #59003Chris CoyierKeymasterVideo on setting the body ID to control current nav:
https://css-tricks.com/video-screencasts … e-body-id/June 12, 2009 at 1:05 am #59011spate1yMemberWow… I wish I had used my resources correctly.
Got it done in a flash with no problems.
Chris: May I suggest you have the code typed up in the notes for other viewers. I had to take a screenshot of the video in full screen so I could copy it into my text editor.
June 20, 2009 at 12:15 am #59376spate1yMemberWhat would you do for sub-pages? I tried what the guy in the comments recommended, but that didn’t work.
March 26, 2010 at 4:53 pm #73024proto25MemberWhat is the method for achieving the same using the ‘wp_list_pages’ tag with the ‘body_class’ tag?
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.