Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-05-2012, 09:13 AM   PM User | #1
Celery
New to the CF scene

 
Join Date: Dec 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Celery is an unknown quantity at this point
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!
Celery is offline   Reply With Quote
Old 12-05-2012, 09:16 AM   PM User | #2
backa
New Coder

 
Join Date: Oct 2012
Posts: 44
Thanks: 7
Thanked 3 Times in 3 Posts
backa is an unknown quantity at this point
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 -->
backa is offline   Reply With Quote
Old 12-05-2012, 09:29 AM   PM User | #3
Celery
New to the CF scene

 
Join Date: Dec 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Celery is an unknown quantity at this point
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?
Celery is offline   Reply With Quote
Old 12-05-2012, 06:20 PM   PM User | #4
Celery
New to the CF scene

 
Join Date: Dec 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Celery is an unknown quantity at this point
Can nobody help me here?
Celery is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:08 AM.


Advertisement
Log in to turn off these ads.