Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Link hover effect problem

    Hi all

    I have a small problem with controlling my hover effects for my links on a site I am making.

    I have styled my a tags with so they display a dashed line by changing the border attribute when hovered over. I prefer using this instead of text-decoration attribute.

    My problem is now that the same effect (obviously) takes place when hovering over an image which is also a link at the same time, can I can't get rid of it.

    I have tried

    Code:
    img a:hover {
    
          border:none;
    
    }
    But that didn't work...

    The (still unfinished) site is here www.stylewebsites.co.uk/donna-new

    The problem is "download pdf" image under CV

    I hope someone can help me...

    Thanks!

    / dkgemini

    [/CODE]

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,746
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello dkgemini,
    You just need to be more specific than that. Try #tab2 p a {border: none;} and see if that doesn't override your blanket a style.

    See more about specificity here.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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