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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2007
    Location
    America
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    image border/link border conflict (css)

    I don't want images to have any borders, but I do want links to have a bottom border. I've done this in the past and
    Code:
    img{border:0}
    has always been sufficient. I'm not sure why, but it's not working now. It seems like the link styles are taking precedence over the img style.

    Other pertinent code:
    Code:
    a:link, a:visited {
    border-bottom:1px solid #DDDDDD;
    color:#646464;
    text-decoration:none
    }
    a:hover, a:active {
    border-bottom:1px solid #646464;
    color:#646464;
    text-decoration:none;
    outline:none
    }
    If you want to see it for yourself: freewebs.com/chickenmcflip/colophon.htm

    Thanks in advance.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You need to give a class to the links that have images in them then you can do something like this
    Code:
    a.classname {
    border-bottom:0;
    }
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Aug 2007
    Location
    America
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I was afraid I was going to have to do that. It just seems like there should be an easier solution.

    Thank you, though.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Not with CSS no. You could use JS but that kind of defeats the purpose of CSS. Also not everyone has JS enabled.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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