![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 | |
|
Newbie
Join Date: Aug 2007
Posts: 16
Rep Power: 0
![]() |
Re: fitting image into table cell
Quote:
No this is all static. |
|
|
|
|
|
|
#12 |
|
Newbie
Join Date: Aug 2007
Posts: 16
Rep Power: 0
![]() |
Re: fitting image into table cell
Here's a little snipit of code:
<table border=1 height=600 cellspacing=20 width=500 style="color:white"valign="center" align="center"> <tr> <td><img height=50 width=50 src="C:\Documents and Settings\Owner\My Documents\My Pictures\me.jpg"></ ></td> <td>text</td> <td>text</td> </tr> |
|
|
|
|
|
#13 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: fitting image into table cell
Quote:
<table border=1 height=600 cellspacing=20 width=500 style="color:white"valign="center" align="center">Inside or outside the border? Cellspacing has a way of doing that. Further, if the text in the adjoining cells causes a height increase, the height of the cell with the photo will increase, also. I'm guessing that your rendering is pretty much as it should be, given the html you've written, and the content.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
|
#14 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,787
Rep Power: 5
![]() |
Re: fitting image into table cell
Maybe it's the
cellspacing=20 that's giving you undesirable results. That will form outer padding around the image no matter how large you make it. Try setting that to 0, and pad the other cells with a td class. |
|
|
|
|
|
#15 |
|
Newbie
Join Date: Aug 2007
Posts: 16
Rep Power: 0
![]() |
Re: fitting image into table cell
Well why would cell spacing give you any trouble? Cell padding would give you the extra space around the image. How could something out side the cell affect something in the cell?
Anyways, I think I have it now. I just specified the cell size and sized the image accordingly. I thought I tried this before but apparently I hadn't, but seems to do what I want. |
|
|
|
|
|
#16 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: fitting image into table cell
You didn't make it clear where the unwanted space was. That's why I asked if it was inside the border or outside.
Information is key when it comes to getting a problem solved by those who aren't sitting in your chair. You didn't even post any code until post #12. We aren't mind readers. Let me suggest that you visit the C forum and read the "How to Post a Question" thread.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#17 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,787
Rep Power: 5
![]() |
Re: fitting image into table cell
The point is... cellpadding can appear to affect the padding of a cell by shifting its placement with respect to the other cells. As DaWei said, you didn't explain your problem, and that's all we had to go on.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing table cell contents using DHTML | eyeball_kid | JavaScript and Client-Side Browser Scripting | 2 | Oct 2nd, 2007 12:32 AM |
| text in a table cell | glevine | JavaScript and Client-Side Browser Scripting | 5 | Jun 12th, 2005 8:37 AM |
| word wrap in a table cell? | kerriganm | HTML / XHTML / CSS | 4 | May 6th, 2005 5:38 PM |
| Checking source codes of image, audio and video files | on_auc | C++ | 3 | Feb 21st, 2005 8:36 PM |
| Change background on a table row (or cell) | kurifu | Java | 2 | Jan 11th, 2005 6:38 PM |