Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old June 6th, 2008, 11:01 AM   #1
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 841
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
Current page problems

Having trouble getting the current page to highlight, my code is:

Code:
<div id="nav-main">

<div id="nav-flag">
       <ul>
           <li><a href="#"><img src="i/de.gif" title="German Site" alt="German Site" /></a></li>
        <li><a href="#"><img src="i/gb.gif" title="English Site" alt="English Site" /></a></li>
    </ul>
</div>

       <ul>
           <li><a <?php if ($page == 'home') { echo ' id="active"'; }?> href="index.php" title="A &amp; E Gibson - Painters and Decorators">Home</a></li>
           <li><a <?php if ($page == 'services') { echo ' id="active"'; }?> href="services.php" title="A &amp; E Gibson - What we offer">Services</a></li>
        <li><a <?php if ($page == 'test') { echo ' id="active"'; }?> href="test.php" title="A &amp; E Gibson Client Testamonials">Testamonials</a></li>
        <li><a <?php if ($page == 'contact') { echo ' id="active"'; }?> href="contact.php" title="Contact A &amp; E Gibson">Contact</a></li>
    </ul>
    
</div>

CSS


Code:
#active {text-decoration:underline; color: #000;}

Anyone any ideas?

Cheers, Craig
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 6th, 2008, 12:33 PM   #2
Reputable Member
 

Join Date: Oct 2006
Location: Southampton
Age: 31
Posts: 356
Blog Entries: 2
Thanks: 2
Thanked 8 Times in 8 Posts
Rep Altering Power: 0 frinkky is on a distinguished road
Re: Current page problems

Does view source show that the conditionals are generating correctly?
__________________
Web Design Forums
frinkky is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 6th, 2008, 03:40 PM   #3
Most Reputable Member
 

Join Date: May 2007
Location: Cornwall, England
Posts: 1,421
Blog Entries: 8
Thanks: 18
Thanked 14 Times in 14 Posts
Rep Altering Power: 0 Jack Franklin will become famous soon enough
Re: Current page problems

As frinkky says, from looking at it, it looks as if the PHP is wrong. But I can't see anything wrong with that either.
__________________
Yours is the Earth and everything that's in it
And - which is more - you'll be a Man my son!
Jack Franklin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 10th, 2008, 04:44 PM   #4
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 841
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
Re: Current page problems

For people reading this the problem has been fixed

Was a problem of CSS Specifity, see here for more information about this

http://www.htmldog.com/guides/cssadvanced/specificity/

Craig
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
After login: Redirect to page in history (Current - 2)... skuliaxe PHP 4 February 20th, 2008 12:54 PM
highlight current page unitedcraig HTML, XHTML and CSS 53 February 13th, 2008 06:20 PM
highlight the current page of a drop down menu Oak HTML, XHTML and CSS 2 February 11th, 2008 11:08 PM
How to highlight the current page Nav link ? Oak HTML, XHTML and CSS 11 January 20th, 2008 09:21 AM
Indicating current page on navigation bar masonbarge PHP 2 October 30th, 2006 03:40 PM


Search Engine Optimization by vBSEO 3.2.0 RC8