- This topic is empty.
-
AuthorPosts
-
February 26, 2010 at 10:50 am #28185
runofthemill
MemberIn designing this page (http://www.garderobeonline.com/garderobepage/update/sortingpage.php), I realized it would be simpler to have the navigation as a separate .php file, but I also want to have the navigation highlight the active page. When the navigation was part of the HTML of each page, i assigned the #active class to the corresponding link to apply this CSS:
Code:color: #7c935d;
margin-right: 0px;
margin-left: 0px;
padding-right: 0px;
padding-left: 0px;
margin: 0 2px 0 2px;
text-decoration:none;
border: 1px solid;
border-color: #913d3b;Is it possible to apply an active state to each page? Here’s the code for the header
Code:I saw this code in the CSS help forum, but it seems to be only applicable to wordpress as it returns a directory and isn’t much help to me.
Code:February 26, 2010 at 1:48 pm #71643runofthemill
MemberAwesome! Method #3 worked perfectly. Thanks!
March 2, 2010 at 3:13 am #71844quelake
MemberI use another method;
I assign a unique body-ID to every page by using the filename:
Code:“>In your css you can then simply add styling for the active state of that page (filename is without ".php" of course);
Code:body#filename1 ul#navigation li a.button_that_needs_to_have_active_state,
body#filename2 ul#navigaton li a.button_that_needs_to_have_active_state_here {
“behaviour for active state”}
AuthorPostsViewing 3 posts - 1 through 3 (of 3 total)- The forum ‘Back End’ is closed to new topics and replies.