a:link, active, hover, visited....

This is a discussion on "a:link, active, hover, visited...." within the Web Page Design section. This forum, and the thread "a:link, active, hover, visited.... are both part of the Design Your Website category.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 22nd, 2007, 17:40
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 229
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
a:link, active, hover, visited....

Okay, I don't know that it's for this but I think it is. I am wanting to change the color of the word when i'm on that page.. like say i hover over the word forums and it loads the page, I want it to change the color to the hover color and so on. lol.. I hope i explained this good enough.

How do I do that? lol...
Last Blog Entry: My blog? (Oct 18th, 2007)
Reply With Quote

  #2 (permalink)  
Old Oct 22nd, 2007, 17:44
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

I don't get it ... but ... did you look at the CSS Beginner FAQ? There's one on How do I change the color of my links?
Reply With Quote
  #3 (permalink)  
Old Oct 22nd, 2007, 18:08
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 229
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
Re: a:link, active, hover, visited....

yes i did look there but didn't find anything.


this is what i'm wanting to do WHEN the page is on monthlysignin

i want it like this
likethis.jpg



not liek this:
notlikethis.jpg
Last Blog Entry: My blog? (Oct 18th, 2007)

Last edited by karinne; Oct 22nd, 2007 at 18:26. Reason: Please attach big images.
Reply With Quote
  #4 (permalink)  
Old Oct 22nd, 2007, 18:12
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,649
Thanks: 0
Thanked 8 Times in 8 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: a:link, active, hover, visited....

You will need to create a .current class or whatever you want to call it...
Reply With Quote
  #5 (permalink)  
Old Oct 22nd, 2007, 18:20
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 229
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
Re: a:link, active, hover, visited....

so in my html i'll put class="current"

and my css would be like...

Code: Select all
a.current {
  background-color: #ffffff;
 color: #000000;
 text-decoration: none;
  padding: 0px 0px 1px 20px;
}
Last Blog Entry: My blog? (Oct 18th, 2007)
Reply With Quote
  #6 (permalink)  
Old Oct 22nd, 2007, 18:25
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

Well ... is that one hover or when you are on THAT page and you want that style?

Last edited by karinne; Oct 22nd, 2007 at 18:27.
Reply With Quote
  #7 (permalink)  
Old Oct 22nd, 2007, 19:55
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 229
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
Re: a:link, active, hover, visited....

when im on that page i want THAT style, lol.
Last Blog Entry: My blog? (Oct 18th, 2007)
Reply With Quote
  #8 (permalink)  
Old Oct 22nd, 2007, 21:37
AdRock's Avatar
SuperMember

SuperMember
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to AdRock
Re: a:link, active, hover, visited....

Would it not be the active link that you need to add properties for seeing as that link is active
Reply With Quote
  #9 (permalink)  
Old Oct 22nd, 2007, 21:44
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 229
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
Re: a:link, active, hover, visited....

I tried that AdRock. lol.. I jsut dunno haha.... I tried it but it didn't work'


And I need to speak with you as well hehe.. So if you get free IM me please, lol.
Last Blog Entry: My blog? (Oct 18th, 2007)
Reply With Quote
  #10 (permalink)  
Old Oct 22nd, 2007, 21:51
AdRock's Avatar
SuperMember

SuperMember
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to AdRock
Re: a:link, active, hover, visited....

Actually, i don't know why i suggested that becuase it will only change while you hold the link down
Reply With Quote
  #11 (permalink)  
Old Oct 23rd, 2007, 04:44
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Send a message via Yahoo to Monie
Re: a:link, active, hover, visited....

Quote:
Originally Posted by mcdanielnc89 View Post
when im on that page i want THAT style, lol.
This is not related to hover, active visited or what ever.
I have done this king of technique in my page not long ago, but I can't host it because, mmm... time consuming.

I'll guide you through it tho,

Let's make this clear..
In every page that you visited, you want the menu to have a special different king of color, am I right?

Your CSS:
Code: Select all
.selected a { 
    display: block;
    text-decoration: none;
    font: small verdana; 
    font-size: 12px;
    color: #99cc33;
    margin: 0; 
    padding: 0;
    width: 100%;
    height: 100%;
    background: #000; /* Make the button black for selected page */
}
.nonselected a {
    your default setting all your button color, font, etc..
}
Code: Select all
(home.asp page)
<div class="selected"><a href="default.asp">Home</a></div>
<div iclass="notselected"><a href="aboutme.asp">About Us</a></div>
<div class="notselected"><a href="#">Monthly Sign-In</a></div>
<div class="notselected"><a href="#">Forums</a></div>
Code: Select all
(aboutUs.asp page)
<div class="notselected"><a href="default.asp">Home</a></div>
<div class="selected"><a href="aboutUs.asp">About Us</a></div>
<div class="notselected"><a href="#">Monthly Sign-In</a></div>
<div class="notselected"><a href="#">Forums</a></div>
there you go...
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)

Last edited by Monie; Oct 23rd, 2007 at 08:45. Reason: recorrect my links
Reply With Quote
  #12 (permalink)  
Old Oct 23rd, 2007, 05:18
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 229
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
Re: a:link, active, hover, visited....

hmm nice. I owe u big time, lol..
Last Blog Entry: My blog? (Oct 18th, 2007)
Reply With Quote
  #13 (permalink)  
Old Oct 23rd, 2007, 05:21
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Send a message via Yahoo to Monie
Re: a:link, active, hover, visited....

Quote:
Originally Posted by Marc View Post
You will need to create a .current class or whatever you want to call it...
Marc "saw" it first, lol.
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Reply With Quote
  #14 (permalink)  
Old Nov 2nd, 2007, 23:09
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 229
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
Re: a:link, active, hover, visited....

Hmm, I'm now back to working on this problem, lol..

my CSS is

HTML: Select all
.selected a { 
    display: block;
    text-decoration: underline;
    font-family: Arial, Verdana, sans-serif; 
    font-size: 10pt;
    color: #ffffff;
    margin: 0; 
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000; /* Make the button black for selected page */
}
.nonselected a {
    your default setting all your button color, font, etc..
}
them my html is

HTML: Select all
      <ul id="menu">
   <div class="selected"><li><a href="index.php" class="current">Home</a></li></div>
   <div class="notselected"><li><a href="index.php?page=aboutus" class="current">About Us</a></li></div>
   <div class="notselected"><li><a href="index.php?page=signin">Monthly Sign-in</a></li></div>
   <div class="notselected"><li><a href="index.php?page=statementoffaith">Statement of Faith</a></li></div>
   <div class="notselected"><li><a href="http://www.forums.newbreedjesusfreaks.com">Forums</a></li></div>
   <div class="notselected"><li><a href="index.php?page=rules">Rules</a></li></div>
   <div class="notselected"><li><a href="http://www.chat.newbreedjesusfreaks.com">Chatroom</a></li></div>
   <div class="notselected"><li><a href="index.php?page=downloads">Downloads</a></li></div>
   <div class="notselected"><li><a href="index.php?page=requests">Requests</a></li></div>
   <div class="notselected"><li><a href="index.php?page=tencommandments">Ten Commandments</a></li></div>
   <div class="notselected"><li><a href="#">Pictures</a></li></div>
   <div class="notselected"><li><a href="index.php?page=staff">Staff</a></li></div>
   <div class="notselected"><li><a href="index.php?page=memberofthemonth">Member of the Month</a></li></div>
   <div class="notselected"><li><a href="index.php?page=puritypledge">Purity Pledge</a></li></div>
   <div class="notselected"><li><a href="index.php?page=links">Links</a></li></div>
   <div class="notselected"><li><a href="index.php?page=search">Search</a></li></div>
   <div class="notselected"><li><a href="index.php?page=donate">Support Us</a></li></div>
   <div class="notselected"><li><a href="index.php?page=contactus">Contact Us</a></li></div>
      </ul>
I don't rightfully understand this. lol.. if i click another page it doe snothing. only home is selected.. what exactly must I do.. i hope it's not what I'm thinking cuz that would take ages, lol.
Last Blog Entry: My blog? (Oct 18th, 2007)
Reply With Quote
  #15 (permalink)  
Old Nov 3rd, 2007, 02:12
Reputable Member
Join Date: Jul 2006
Location: USA
Age: 15
Posts: 113
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

yes, you have to go into every page and write the selcted class on the link you want selected.
Last Blog Entry: Website critique (Apr 16th, 2008)
Reply With Quote
  #16 (permalink)  
Old Nov 3rd, 2007, 04:10
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

motormaniac is right, on every page the .selected class needs to be applied to the corresponding link. But, as I was looking through your html, I noticed that you have only one page - index.php, and the content is determined by ?page=NameOfPage. This means that the .selected class won't work! You need a separate page for each link to make all of this work... Am I making sense? Point is, the way you have it set up will fail.

Cheers,
SWagner
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #17 (permalink)  
Old Nov 3rd, 2007, 04:57
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 229
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
Re: a:link, active, hover, visited....

No possible way to do it the way mine is set up?
Last Blog Entry: My blog? (Oct 18th, 2007)
Reply With Quote
  #18 (permalink)  
Old Nov 3rd, 2007, 08:05
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,649
Thanks: 0
Thanked 8 Times in 8 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: a:link, active, hover, visited....

You could do it with PHP...

On the index.php?page=aboutUs you would have this:

PHP: Select all

<?php
// tell the php what page it is!
$page "aboutus";
?>
and on the menu include put somthing like this for your menu:

PHP: Select all

<li><a href="index.php?page=aboutus" class="<?php if(page == "aboutus") {print "current";} ?>">About Us</a></li>
I dont know if that will work but it is just off the top of my head. Just an idea
Reply With Quote
  #19 (permalink)  
Old Nov 3rd, 2007, 15:08
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 229
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
Re: a:link, active, hover, visited....

mmk, I kind of see how it's going with the php, but one thing... How wouddl i get it to show that it's on the current page? Like that above would just be getting it to work. No style or anything is applied to it. That's the only thing I'm not understanding how i would do it. (If need be i can explain more,(try to anyhow).
Last Blog Entry: My blog? (Oct 18th, 2007)
Reply With Quote
  #20 (permalink)  
Old Nov 3rd, 2007, 16:32
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,649
Thanks: 0
Thanked 8 Times in 8 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: a:link, active, hover, visited....

You will need to create a .current {} in your css.....
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