HighDots Forums  

Image larger than a TD

alt.html.dhtml alt.html.dhtml


Discuss Image larger than a TD in the alt.html.dhtml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Skind
 
Posts: n/a

Default Image larger than a TD - 11-27-2004 , 03:39 AM






Hello,
I would like to show an image in a cell without modifying the size of the
image nor those of the cell.
This is ok when image is smaller but when it is larger, the cell expends to
fit the size of the image.
I have not achieved to use CSS options (as OVERFLOW) to make it work.
If I put my image in background, it is cliped.
Any idea ?
Thanks,
Michael



Reply With Quote
  #2  
Old   
Randy Webb
 
Posts: n/a

Default Re: Image larger than a TD - 11-27-2004 , 09:09 AM






Michael Skind wrote:
Quote:
Hello,
I would like to show an image in a cell without modifying the size of the
image nor those of the cell.
This is ok when image is smaller but when it is larger, the cell expends to
fit the size of the image.
I have not achieved to use CSS options (as OVERFLOW) to make it work.
If I put my image in background, it is cliped.
Any idea ?
Thanks,
Michael


Set the size of your TD in pixels.
Set the size of your img to 100% width and height.

Nothing to do with javascript nor dHTML, try alt.html or
comp.infosystems.www.authoring.html

alt.comp.lang.javascript is old and non-chartered, try
comp.lang.javascript instead.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq


Reply With Quote
  #3  
Old   
Michael Skind
 
Posts: n/a

Default Re: Image larger than a TD - 11-27-2004 , 09:35 AM



Quote:
Hello,
I would like to show an image in a cell without modifying the size of the
image nor those of the cell.
This is ok when image is smaller but when it is larger, the cell expends
to fit the size of the image.
I have not achieved to use CSS options (as OVERFLOW) to make it work.
If I put my image in background, it is cliped.
Any idea ?
Thanks,
Michael

Set the size of your TD in pixels.
Set the size of your img to 100% width and height.

Nothing to do with javascript nor dHTML, try alt.html or
comp.infosystems.www.authoring.html

alt.comp.lang.javascript is old and non-chartered, try
comp.lang.javascript instead.

--
Randy
Thanks for your answer, but what I need is more complex
Your solution make only the image to fill the TD.
I don't want to change the look of image.

Here is the less bad solution I have found :
<TD>
<SPAN style="position: absolute; bottom: auto;">
<IMG>
</SPAN>
</TD>
But with this the image (or SPAN) is aligned on the top left corner and I
would like it aligned on the bottom right corner.
Any modifications I do on the TD style (cursor shape, border color) daoes
not appear any more.

Any idea ?

Michael




Reply With Quote
  #4  
Old   
Are Nybakk
 
Posts: n/a

Default Re: Image larger than a TD - 08-19-2008 , 03:22 AM



*snip*
Quote:
Set the size of your TD in pixels.
Set the size of your img to 100% width and height.
*snip*

Something like this I guess:

<table style="size: 200px; table-layout: fixed;">
<tr>
<td style="width: 150px;"><img src="img/image.gif" alt=""
style="width: 100%;" /></td>
<td style="width: 50px;">Test</td>
</tr>
</table>

Quote:
Thanks for your answer, but what I need is more complex
Your solution make only the image to fill the TD.
I don't want to change the look of image.
Now that was hard to understand. You want both the image and table cell
unchanged even though the image is too big? That doesn't make sense to
me at all.
I'm suspecting you are using tables for page layout. My advice would be
to try using containers and css (floats) instead.

Quote:
Here is the less bad solution I have found :
TD
SPAN style="position: absolute; bottom: auto;"
IMG
/SPAN
/TD
But with this the image (or SPAN) is aligned on the top left corner and I
would like it aligned on the bottom right corner.
Any modifications I do on the TD style (cursor shape, border color) daoes
not appear any more.

Any idea ?

Michael



Reply With Quote
  #5  
Old   
Are Nybakk
 
Posts: n/a

Default Re: Image larger than a TD - 08-29-2008 , 05:48 AM



Heh.. that was 4 years late...

Are Nybakk wrote:
Quote:
*snip*
Set the size of your TD in pixels.
Set the size of your img to 100% width and height.
*snip*

Something like this I guess:

table style="size: 200px; table-layout: fixed;"
tr
td style="width: 150px;"><img src="img/image.gif" alt=""
style="width: 100%;" /></td
td style="width: 50px;">Test</td
/tr
/table


Thanks for your answer, but what I need is more complex
Your solution make only the image to fill the TD.
I don't want to change the look of image.

Now that was hard to understand. You want both the image and table cell
unchanged even though the image is too big? That doesn't make sense to
me at all.
I'm suspecting you are using tables for page layout. My advice would be
to try using containers and css (floats) instead.


Here is the less bad solution I have found :
TD
SPAN style="position: absolute; bottom: auto;"
IMG
/SPAN
/TD
But with this the image (or SPAN) is aligned on the top left corner
and I would like it aligned on the bottom right corner.
Any modifications I do on the TD style (cursor shape, border color)
daoes not appear any more.

Any idea ?

Michael


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.