highlight current page

This is a discussion on "highlight current page" within the Web Page Design section. This forum, and the thread "highlight current page are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack (1) Thread Tools
  #41 (permalink)  
Old Feb 3rd, 2008, 12:33
Oak's Avatar
Oak Oak is offline
SuperMember

SuperMember
Join Date: Dec 2007
Location: London
Age: 35
Posts: 289
Thanks: 6
Thanked 0 Times in 0 Posts
Re: highlight current page

...No

I tried paying around with the settings to stop this rule when I first added the drop d menu to the site, but had no luck.
Reply With Quote
  #42 (permalink)  
Old Feb 3rd, 2008, 12:48
Jack Franklin's Avatar
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,288
Blog Entries: 8
Thanks: 10
Thanked 5 Times in 5 Posts
Re: highlight current page

Try getting in contact with whoever wrote the list in the first place? They might have a fix.
__________________
Resources Administrator


Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Reply With Quote
  #43 (permalink)  
Old Feb 3rd, 2008, 13:02
Oak's Avatar
Oak Oak is offline
SuperMember

SuperMember
Join Date: Dec 2007
Location: London
Age: 35
Posts: 289
Thanks: 6
Thanked 0 Times in 0 Posts
Re: highlight current page

Ok thanks!! I will let you know how I get on.
Reply With Quote
  #44 (permalink)  
Old Feb 12th, 2008, 23:40
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 849
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: highlight current page

Can anyone explain why, when i'm on the current page, the underline extends past the width of the text?

http://simplyfreeware.co.uk/db/prices.php

Thanks for your help
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
  #45 (permalink)  
Old Feb 12th, 2008, 23:41
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 849
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: highlight current page

The site is not an actual site by the way, just a template I've uploaded onto my server
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
  #46 (permalink)  
Old Feb 13th, 2008, 18:11
Jack Franklin's Avatar
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,288
Blog Entries: 8
Thanks: 10
Thanked 5 Times in 5 Posts
Re: highlight current page

Post CSS/xHTML for navigation please? Is it in all browsers or just one?
__________________
Resources Administrator


Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Reply With Quote
  #47 (permalink)  
Old Feb 13th, 2008, 21:15
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 849
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: highlight current page

Here's the html code, i am using php includes, don't know if this will have any affect

HTML: Select all
    <ul>
        <li<?php if ($page == 'aboutus') { echo ' id="active"'; }?>><a href="aboutus.php">About Us</a></li>
        <li<?php if ($page == 'prices') { echo ' id="active"'; }?>><a href="prices.php">Prices</a></li>
        <li<?php if ($page == 'contact') { echo ' id="active"'; }?>><a href="contact.php">Contact</a></li>
    </ul>
And here's the CSS

Code: Select all
/***NAVIGATION***/

#navigation {
    float: right;
    width: 300px;
    margin-right: 0px;
}

#navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#navigation ul li {
    float: left;
    width: 90px;
    padding-top: 20px;
}

#navigation ul li a {
    display: block;
    height: 30px;
    text-transform: uppercase;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    margin-right: 32px;
    padding-top: 5px;
    letter-spacing: 1px;
    font: 10px Tahoma, Geneva, sans-serif;
}

#navigation ul li a.last {
    margin-right: 0;
}

#navigation ul li a:hover {
    background-color: #669933;
    border-bottom: 5px solid #003300;
}

#active {
    display: block;
    height: 30px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    padding-top: 5px;
    letter-spacing: 1px;
    font: 10px Tahoma, Geneva, sans-serif;
    border-bottom: 5px solid #FF0000;
}
Thanks for your help
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
  #48 (permalink)  
Old Feb 13th, 2008, 21:24
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 849
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: highlight current page

And it is in FF 2.0 and IE7, don't worry about the way the column is displayed in IE, will sort that out later, just concerned about the navigation
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
  #49 (permalink)  
Old Feb 13th, 2008, 21:25
Jack Franklin's Avatar
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,288
Blog Entries: 8
Thanks: 10
Thanked 5 Times in 5 Posts
Re: highlight current page

Looks like my includes code

Anyway, the includes will have no effect what-so-ever. The code seems fine. Try giving the #active a width of 90px (Or whatever the width of the <li> should be.)
So it does not happen in IE6?
__________________
Resources Administrator


Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Reply With Quote
  #50 (permalink)  
Old Feb 13th, 2008, 21:30
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 849
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: highlight current page

Quote:
Originally Posted by jackfranklin View Post
Looks like my includes code
Yes got that off your blog , hope that means you'll be able to help me fix it lol


Code: Select all
#active {
    display: block;
    width: 90px;
    height: 30px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    padding-top: 5px;
    letter-spacing: 1px;
    font: 10px Tahoma, Geneva, sans-serif;
    border-bottom: 5px solid #FF0000;
I have done that and is appears to have no affect :S

Quote:
Originally Posted by jackfranklin View Post
So it does not happen in IE6?
On vista so i can't install IE6, and the multiple IE doesn't work on vista, is there a way i can without installing a virtual pc by the way?
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
  #51 (permalink)  
Old Feb 13th, 2008, 21:35
Jack Franklin's Avatar
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,288
Blog Entries: 8
Thanks: 10
Thanked 5 Times in 5 Posts
Re: highlight current page

I just checked... it does the same thing in IE6. Try adding padding: 5px 0 0 0; instead of padding: 5px; and margin: 0; there as well. If you change the width to 200px or something stupid, does the border extend with it?
__________________
Resources Administrator


Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Reply With Quote
  #52 (permalink)  
Old Feb 13th, 2008, 21:56
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 849
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: highlight current page

Code: Select all
#active {
    display: block;
    width: 200px;
    height: 30px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    padding: 5px 0 0 0;
    margin: 0;
    letter-spacing: 1px;
    font: 10px Tahoma, Geneva, sans-serif;
    border-bottom: 5px solid #FF0000;
}
Changed it to this, and it's still the same in both FF and IE7

any ideas??
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
  #53 (permalink)  
Old Feb 13th, 2008, 22:00
Jack Franklin's Avatar
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,288
Blog Entries: 8
Thanks: 10
Thanked 5 Times in 5 Posts
Re: highlight current page

Try changing #active to #active li or li #active? No idea!
__________________
Resources Administrator


Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Reply With Quote
  #54 (permalink)  
Old Feb 13th, 2008, 22:20
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 849
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: highlight current page

I'll have a play around, see what happens.

If there's anyone else with any comments please feel free to help

Thanks jack
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
Reply

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

LinkBacks (?)
LinkBack to this Thread: http://www.webforumz.com/web-page-design/64775-highlight-current-page.htm
Posted By For Type Date
chromestyle nav/highlight active page IE problem - Dynamic Drive Forums This thread Refback Apr 26th, 2008 17:49

Similar Threads
Thread Thread Starter Forum Replies Last Post
Current page problems unitedcraig Web Page Design 3 Jun 10th, 2008 20:44
After login: Redirect to page in history (Current - 2)... skuliaxe PHP Forum 4 Feb 20th, 2008 16:54
highlight the current page of a drop down menu Oak Web Page Design 2 Feb 12th, 2008 03:08
How to highlight the current page Nav link ? Oak Web Page Design 11 Jan 20th, 2008 13:21
Indicating current page on navigation bar masonbarge PHP Forum 2 Oct 30th, 2006 19:40


All times are GMT. The time now is 02:53.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43