SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast richkid's Avatar
    Join Date
    Feb 2005
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    blue borders around image links (was "i think i am stupid!")

    hi guys.
    i am working on my new website, and i am not a coder. I just design. so i have a really simple problem you guys can probably work out with your eyes closed.

    http://new.marketingpros.com.au

    you will see some blue boxes around some of the images... why is this happening?

    thanks
    Tom

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    153 Post(s)
    Tagged
    3 Thread(s)
    Hi Tom, it's because they are links and that is the default border.
    In your css put:
    Code:
    a {
        border: 0;
    }
    or better still, take borders, padding and margins off everything so that you control more
    Code:
    * {
        margin: 0;
        padding: 0;
        border: 0;
    }
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Enthusiast richkid's Avatar
    Join Date
    Feb 2005
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow that was quick.. i knew it was something simple..
    thankyou so much for your help!

  4. #4
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    153 Post(s)
    Tagged
    3 Thread(s)
    No problem Tom, happy to help
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't use the universal selector to strip the borders off of elements - it's bad enough that form controls can lose focus when using it to strip the margins and padding from them, but due to the inconsistent way browsers render forms anyway, it's just an all around bad idea.

    What I'd do instead is use the following rule for images:

    Code CSS:
    img {
        border: 0;
        display: block;
    }

    Not only does this get rid of the borders when the images are in links, but it also knocks out a nasty IE bug at the same time.

  6. #6
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    153 Post(s)
    Tagged
    3 Thread(s)
    Good call Dan
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....


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
  •