#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Posts
    18
    Rep Power
    0
    if i define a style in my <head> such as...:

    <style type="text/css">
    //<!--

    A:link {text-decoration: none; color: black}
    A:visited {text-decoration: none; color: black}
    A:hover {text-decoration: none; color: red}

    //-->
    </style>

    ... how do i change styles in the middle of my document...

    example:

    <body>
    <a STYLE='text-decoration:none;color:#ff0000;hover:#0000ff;' href="/advancedsite.htm">Advanced Site</a>

    ... this does change the color of the link, but it does not change color when i hover over the link...

    how do i change my code so that the "hover" position can be different for all of the links...?

    thanks
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    Love to be proved wrong ... but I do not think that this is possible , you could emulate it by using stacked layers in the same position and then use javascript instead of <a href... to swap the layers and redirect on click.

    Hoping to be shown otherwise !
    Simon

    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Posts
    18
    Rep Power
    0
    Actually... i already figured it out...

    the key is different style definitions...

    A.Mainlevel:link {text-decoration: none; color: white}
    A.Mainlevel:visited {text-decoration: none; color: white}
    A.Mainlevel:hover {text-decoration: none; color: red}

    A.text:link {text-decoration: none; color: blue}
    A.text:visited {text-decoration: none; color: blue}
    A.text:hover {text-decoration: none; color: red}

    then inputting the style in the links...

    <A CLASS="Mainlevel" href="blah....blah...

    thank you for your time though... i hope this helps you...


  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    5
    Rep Power
    0
    There's a mistake in your style element. Specifically, the "//" at the beginning should be visible when the document is viewed in a browser that doesn't support style elements.

Similar Threads

  1. turning css styles off
    By Mystic511 in forum CSS Help
    Replies: 2
    Last Post: December 3rd, 2003, 12:36 PM
  2. CSS - multiple styles on one page
    By ez8 in forum CSS Help
    Replies: 2
    Last Post: October 14th, 2003, 04:03 PM
  3. possible? internal reference among css styles
    By jporven in forum CSS Help
    Replies: 6
    Last Post: September 16th, 2003, 01:07 AM
  4. CSS Styles for <Select> list
    By fr0styxm in forum CSS Help
    Replies: 5
    Last Post: August 27th, 2003, 07:57 AM
  5. CSS: 2 Input Styles
    By Optimum in forum CSS Help
    Replies: 12
    Last Post: November 16th, 2002, 01:01 PM

IMN logo majestic logo threadwatch logo seochat tools logo