You are here: Help! Fixed width table with a 100% width image in it is assuming the images intrinsic size, although it does shrink the image « HTML « IT news, forums, messages
Help! Fixed width table with a 100% width image in it is assuming the images intrinsic size, although it does shrink the image

Posted by satya.komatineni@gmail.com on 12/29/07 18:42

I have struggling with this for 2 days. I searched far and wide in
google and msdn etc. No luck. Hope one of you may have seen this. I
am
seeing this in ie6 and ie7

What I want
**************
1. A table with a single cell that is say 100px wide, laid out from
left to right.
2. I want to put an image in it and set its width to 100px as well


What I expect
******************
I see the image that is shrunk in width to 100px wide.


Instead I see
*******************
1. I do see the image shrunk to 100px
2. But I see the width of the "td" increased to 500px which is the
size of the actual image


Here is the source code for it
*************************************
<html>
<head>


<style>
#test {background:blue}
</style>


</head><body>
<p>before the table
<table id="testt"><tr><td id="test" width="100px">
<image width="100%" src="http://hiddenlakegardens.msu.edu/
seasonal_interests/fall/fall1.jpg">
</image>
</td></tr></table>
<p>after the table
</body></html>


Here is the URL you can use to see the blue background of the
stretched "td"


http://www.satyakomatineni.com/akc/display?url=DisplayNoteBodyURL&reportId=2400&ownerUserId=satya


Does anyone know how to be able to say the width of an image to 100%
while restricting its size using a container above such as a "td". I
can fix this by fixing the image width, but then I have to deal with
margins etc.


Your help is much much appreciated.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация