Results 1 to 6 of 6

Thread: Simple Onclick, Not Clicked question

  1. #1
    Join Date
    Aug 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Simple Onclick, Not Clicked question

    Gee,this is a bit embarrassing...i know its kinda simple but i cant seem to figure out why...

    Here's my pathetic CSS script:

    <style>
    a:link
    {
    text-decoration:none
    }
    a:visited
    {
    color: #000000;
    }
    a:hover
    {
    color: #FFFF00;text-decoration:underline
    }

    a:active
    {
    color: #006666;text-decoration:underline
    }
    </style>


    My problem is everytime I click on a link on the page, the underline remains...i've tried dozens of combinations but everytime I click and even reload the page...the darn underline still remains...ugh...

    The other "issue" I have is how do you make the link "remain in an onclick" mode, (thus telling the visitor that it was the current link clicked)...however, as soon as another link is clicked...the last one clicked changes back to its original mode...ugh! I should get my _ss clicked!

    Thanks for any replies

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by serendipity
    <style>
    The type attribute is required:
    HTML Code:
    <style type="text/css">
    a:visited
    {
    color: #000000;
    }
    Whenever you specify a foreground colour, you should always make sure that a background colour is explicitly specified for that element somewhere. Users with a default colour scheme that differs from yours (a themed Windows or Linux desktop, or altered browser preferences - either for aesthetic or accessibility reasons) will otherwise find an unreadable document.

    My problem is everytime I click on a link on the page, the underline remains
    You don't explicitly remove the underline with the visited pseudo-class (may be a problem, depending on the default browser style sheet), but even then the decoration will only be removed on subsequent visits, and whilst that destination remains in the browser history.

    The other "issue" I have is how do you make the link "remain in an onclick" mode
    The active pseudo-class (the equivalent of 'onmousedown', usually) only applies whilst the element is active. Once the user stops interacting with the element, it will revert to its previous style. The only way to persist the effect would be using a script. Is it really that important?

    Mike

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This might get you closer to what you are looking for:
    Code:
    a:visited
    {
    color: #000000; 
    text-decoration:underline;
    }
    Oh, and give it a background color, Mike is so right about that.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Aug 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the tip guys! The simple ones usually get me

    Quote Originally Posted by mwinter
    The active pseudo-class (the equivalent of 'onmousedown', usually) only applies whilst the element is active. Once the user stops interacting with the element, it will revert to its previous style. The only way to persist the effect would be using a script. Is it really that important?

    Mike
    Hmmmm...well, its not really that important, but it is kinda cool "effect" to have, especially since i've kinda discovered the wonders of "iframes" --pages within pages. Actually, the effect i'm looking for is similar to the Link Bar Properties on MS Frontpage...text links/graphics get "highlighted" or decorated when hovered on a menu link, and when clicked, it loads the page but at the same time the "highlight effect" remains active as a sort of "reminder" to where the page user is currently uhm, located. It's pretty neat and simple especially when the menu bar links indicate where you are right? But hey, its just me

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, if frontpage can do what you want, why not use it? I have a feeling a script would be involved in the effect though. If the script is not cross browser friendly, it could be made so. Can you supply a link to a page that does what you want yours to do? I'm sure it is possible, probably fairly simple, partly I am not clear on the exact specifics or I'd write you some code myself.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Aug 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking

    Quote Originally Posted by jscheuer1
    Well, if frontpage can do what you want, why not use it? I have a feeling a script would be involved in the effect though. If the script is not cross browser friendly, it could be made so. Can you supply a link to a page that does what you want yours to do? I'm sure it is possible, probably fairly simple, partly I am not clear on the exact specifics or I'd write you some code myself.
    Good question! Actually, I do use the Frontpage quite often (along with good ole Notepad..in that way i'd like to think pretend I'm "old school" However, there's not much fun breaking down javascripts on FP. Besides, I don't think that particular one I'm looking for runs on javascript anyways...i think its most probably CSS which I have not really grown to love yet (im still old school HTML..haha) so i don't bother much with it...and dont even get my started with th0se cross-browser issues..

    Hmmmm...great offer! Thanks! Lemme think about it (my amateurish pathetic attempts to build a website is embarrassing to say the least)......but you obviously have some time in your hands if you're "offering" to write code yourself..im just a big chief of cut and paste!

Bookmarks

Posting Permissions

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