Results 1 to 7 of 7

Thread: Underline text on image rollover

  1. #1
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default Underline text on image rollover

    Hey again, does anyone know how to make text underline when you rollover an image? Here is a sort of example of what I mean : http://www.bombthehills.com/guides-tricktips-180.html
    The bit I'm referring to is the "back to trick tips" part, with the arrow that moves on rollover. I want to make it so when you rollover the image, the arrow changes and the text underlines at the same time.
    So far, when I've tried, it underlines the text and the image, but I want it to just underline the text.
    Hope you can help me out,

    Thanks,

    Jack.

  2. #2
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    I tried it and it surely works in IE7.

    -magicyte

  3. #3
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    I know it works, but it only 1/2 works. I want the text to underline when you mouse over the actual arrow image, not just when you rollover the text.
    Because at the moment when you mouse over the arrow, it does move, but the text doesn't underline as well.

  4. #4
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default Huh...

    Well, I'm not so sure. Let me check it out...

    -magicyte

  5. #5
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Add the image as the background to the anchor:

    HTML Code:
    <a href="#">back to trick tips</a>
    CSS:
    Code:
    a {
      background:url(images/buttons/back.png) no-repeat center right;
      padding-left:30px;
    }
    
    a:hover {
      background-image:url(images/back/back-over.png);
      text-decoration: underline;
    }

  6. The Following User Says Thank You to Medyman For This Useful Post:

    Schmoopy (10-27-2008)

  7. #6
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    Nice, with a bit of modification, worked a charm.

    Thanks very much

    Jack.

  8. #7
    Join Date
    Oct 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hi it will user full for you

    a {
    margin-left:10px;
    background:url(images/back.png) no-repeat;
    padding-left:30px;
    }

    a:hover {
    background-image:url(images/back-over.png);
    text-decoration: underline;
    }
    Last edited by murthyweb; 10-30-2008 at 08:52 AM. Reason: spelling mistake

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
  •