Results 1 to 5 of 5

Thread: IE7 images not showing up when in an "a" tag

  1. #1
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default IE7 images not showing up when in an "a" tag

    I have an issue that I have no clue what is wrong.

    I have an image that i'm using as a button. when I wrap an a tag around it for the link then in IE7 it doesnt show up. Theres no specific css styling being applied to the a tags either. I tried taking it out of the a tag and then the image shows up.

    heres the code i have in plce for the image.

    Code:
    <td class="table_bottom_column1"></td>
              <td class="table_bottom_column2"><img src="../images/purchase_btn.jpg" title="Purchase Silver" /></td>
              <td class="table_bottom_column3"><a class="buy" href="purchase_signin.php?package=gold"><img class="p_button" src="../images/purchase_btn.jpg" title="Purchase Gold" /></a></td>
              <td class="table_bottom_column4"><a class="buy" href="purchase_signin.php?package=platinum"><img class="p_button" src="../images/purchase_btn.jpg" title="Purchase Platinum" /></a></td>
    you can check out the full page at www.profoundcar.com/test/services.php


    thanks for the help I appreciate it.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    That doesn't have anything to do with the anchor tag. The images that don't show up have the class value p_button. The image that does show up doesn't have that class. The exact piece of code that is causing your images to move off the page in IE is this:
    Code:
    td img.p_button {
    	display:block;
    	background:url(../images/purchase_btn.jpg) no-repeat;
    	height:28px;
    	width:140px;
    	margin:-33px 0 0 22px;
    	cursor:pointer;
    }
    Consider doing whatever that is doing in another way. The best thing would be not to use tables.

    Good luck!

  3. #3
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    I dont understand why that is causing it to bug out in ie though? its the correct positioning and styling in every other browser.

    I used an IE specific style to reset it's margins and such back to 0 and it seems to be ok now.

    and Yeah I normally don't use tables but its tabular data so I used a table. A lot simpler then using floats and positioning to line up perfect with the table lines.

    Thanks though for the help though I appreciate it

  4. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    The problem is that IE has some quirks with tables. Try giving the td's a style of vertical-align: top; and the images a style of margin: auto;

    Good luck!

  5. #5
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    ok thanks,

    IE has problems with basically everything. I'm normally a flash developer so I get caught up in little ie things from time to time. Thanks for the help I appreciate it.

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
  •