PDA

View Full Version : IMG percent inside a cell



kmsmith10
04 Apr 2011, 02:41 PM
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?

serversea
04 Apr 2011, 09:00 PM
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.