Link to home
Start Free TrialLog in
Avatar of redbrad0
redbrad0

asked on

Resize a background image of a cell

I have a cell that I put a background image in. This is all dynamic so I can not just change the image size so I need to do it thru HTML, CSS, ASP or JS. When the image is smaller then the cell I am really not having a problem because I have CSS to make it not tile.
Avatar of imnajam
imnajam
Flag of Pakistan image

Hi redbrad0,

I don't exactly get what you are looking for but just a suggestion that might help you <img src="img.jpg" width="100%" height="100%"> this will always force the image to stretch according to the table cell

Cheers!
Avatar of redbrad0
redbrad0

ASKER

No I am adding the image as the background of the cell. This way when I can add a transparent image in the cell so if you try and right click to download the image you will get the transparent image. In the example below you can kind of see what I am doing. the image.gif in the cell background I would like specify the size of image that is the background to the same size at what the cell is.

<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="200" width="200" background="image.gif"><img src="transparent.gif" border="0"></td>
  </tr>
</table>
ASKER CERTIFIED SOLUTION
Avatar of seanpowell
seanpowell
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Is there a way to set the div inside the cell no matter where it is on the page or do I have to set the positions of the x, y cordinates of the div images.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am a programer and asked by one of my clients to do this and is paying me for my time. I know it does not stop everyone but that was not my question. My question is how to do it not should it be done. So how about we stick to answering the question.

>>> So how about we stick to answering the question

That is exactly what has been done.

You wanted to re-size a background image.  You now know that cannot be done.   You have also been given the option of layering images with absolute position (which has very little hope of working without creating a very rigid structure.

Finally it has been pointed out that the problem is because of the design mistake (imposed by your client, but nonetheless a mistake) which now make it difficult to resolve anything without creating more problems.

Cd&
Just close the stupid question and when I have questions I will find another site that where the moderators are slamming members and when the members respond they get there message deleting but the moderator doesnt because they think they are god and can do whatever they want
Please close this question.
And why? Did anyone answer my question? COBOL should not get any points what so ever basically degrading me and the item I am asking. I asked a long time ago just for the points to be refunded.
fine whatever just give them the points.... what ever the powers to be have to do but COBOL should not get any points for all he did was slam me and the idea. When a customer ask's you to do something then that's what you have to do.