www.webdeveloper.com
Results 1 to 3 of 3

Thread: IE9 link img border

  1. #1
    Join Date
    Jun 2011
    Posts
    2

    Question IE9 link img border

    Hello all,

    I have a small problem with link i am trying to create.

    i have this:
    Code:
    <a href="#"><img src="someimage.jpg" alt="" /></a>
    now i have positiond it with the padding from the parrent div and did a border="0" on the image.

    the problem is this.
    in all browser accept IE9 the images stay in place.
    But IE9 pulls the image up the width of the border any image got by default.

    if you can still follow me then does someone know how to fix this withoud hackes ?

  2. #2
    Join Date
    Jul 2011
    Posts
    10
    do you have a link? i'm not understanding what you mean. are you adding a no-border to the image or it's container?

  3. #3
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,217
    To eliminate borders in image links use CSS:

    Code:
    a img {
    text-decoration: none;
    border: 0;
    }
    Use of the Universal Selector at the top of your CSS file would help to reset browsers:
    Code:
    * { margin: 0; padding: 0; border: 0;
    A complete reset CSS is available on the Internet.

    IE has never gotten dimensions right. IE 9 should be better than the earlier versions, but it isn't. Maybe try using IE's Conditional Comments to tame the problem.

    Furter help can only be given if you post your code and/or link to problem page.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles