Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple Navbar issue

    Hello everyone

    My CSS experience is very limited. Please could you help with my Navbar, which looks like this:

    Code:
    <!-- begin navbar -->
    	<div id="navbar">
    		<ul id="nav">
    			<li><a href="{$mybb->settings['bburl']}/index.php" class="current">Forum Home</a></li>
    			<li><a href="{$mybb->settings['bburl']}/games.php">Arcade</a></li>
    			<li><a href="{$mybb->settings['bburl']}/search.php">Search</a></li>
    			<li><a href="{$mybb->settings['bburl']}/memberlist.php">Member List</a></li>
    			<li><a href="{$mybb->settings['bburl']}/calendar.php">Calendar</a></li>
    			<li><a href="{$mybb->settings['bburl']}/misc.php?action=help">Help</a></li>
    			<li><a href="{$mybb->settings['contactlink']}">Contact Us</a></li>
    		</ul>
    	</div>
    	<!-- end navbar -->
    When I click through the navbar the "Forum Home" tab stays selected. How do I fix this?

    Any help is much appreciated!

  • #2
    New Coder
    Join Date
    Oct 2012
    Posts
    44
    Thanks
    7
    Thanked 3 Times in 3 Posts
    class="current" needs to be set on each page, to that page.
    So on the Arcade page for example, it would look like:
    Code:
    <!-- begin navbar -->
    	<div id="navbar">
    		<ul id="nav">
    			<li><a href="{$mybb->settings['bburl']}/index.php">Forum Home</a></li>
    			<li><a href="{$mybb->settings['bburl']}/games.php" class="current">Arcade</a></li>
    			<li><a href="{$mybb->settings['bburl']}/search.php">Search</a></li>
    			<li><a href="{$mybb->settings['bburl']}/memberlist.php">Member List</a></li>
    			<li><a href="{$mybb->settings['bburl']}/calendar.php">Calendar</a></li>
    			<li><a href="{$mybb->settings['bburl']}/misc.php?action=help">Help</a></li>
    			<li><a href="{$mybb->settings['contactlink']}">Contact Us</a></li>
    		</ul>
    	</div>
    	<!-- end navbar -->

  • #3
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by backa View Post
    class="current" needs to be set on each page, to that page.
    So on the Arcade page for example, it would look like:
    Code:
    <!-- begin navbar -->
    	<div id="navbar">
    		<ul id="nav">
    			<li><a href="{$mybb->settings['bburl']}/index.php">Forum Home</a></li>
    			<li><a href="{$mybb->settings['bburl']}/games.php" class="current">Arcade</a></li>
    			<li><a href="{$mybb->settings['bburl']}/search.php">Search</a></li>
    			<li><a href="{$mybb->settings['bburl']}/memberlist.php">Member List</a></li>
    			<li><a href="{$mybb->settings['bburl']}/calendar.php">Calendar</a></li>
    			<li><a href="{$mybb->settings['bburl']}/misc.php?action=help">Help</a></li>
    			<li><a href="{$mybb->settings['contactlink']}">Contact Us</a></li>
    		</ul>
    	</div>
    	<!-- end navbar -->
    Sorry, I'm still struggling.
    This is the .xml file I'm editing. There's only one of them. How do I change it on each page?

  • #4
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can nobody help me here?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •