Results 1 to 2 of 2

Thread: IMG percent inside a cell

  1. #1
    Join Date
    Jul 2010
    Posts
    2

    IMG percent inside a cell

    I have a slight issue and was wondering if anyone knew a simple fix.

    I have a photo inside of a cell and have it set to 95% height and width inside the cell. In firefox this will take up 95% of the cell space and is the correct size and in internet explorer it sets it to 95% of the entire picture and completley ignores my cell width settings of 33%.

    this is my code below:

    <td width="33%"><div align="left"><img src="images/Fireplac1.jpg" alt="Fireplace" width="95%" height="95%" class="homepicture"></div></td>

    Does ayone have any reccomendations on what I could do to fix the browser difference issue?

  2. #2
    Join Date
    Mar 2011
    Posts
    127
    Percentages should be written only for blocks e.g td, div. Images should be assigned a proper height and width.

    You should first save pictures in your required resolution and then code it with its maximum height and width.
    ServerSea – Low Cost High Quality Web Hosting & Designing
    Domain For Life– 99.9% Up time – Super Fast Servers – Backups – True 24/7 Support
    Money Back Guarantee – Special Discounts – Unlimited Downloads
    http://www.serversea.com

Similar Threads

  1. CSS Page Width - Percent or Pixels?
    By NTxNerd in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 07 Apr 2008, 08:56 AM
  2. IE Image width bug (percent not realative to parent)
    By eletero in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 07 Feb 2007, 02:25 PM

Posting Permissions

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