Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Image problem -- Help?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi.

I have two problems. I need to find out how to display an image that... doesn't take up any space -- so that text can be typed on it and such (I thought it was hspace/vspace but that doesnt' work) and I need to find out how to make that image the width of the table it's in and the height of the table it's in (making it just x% and y% doesn't work I dont think).

There has to be a way!

Thanks!
-NeXius
 
you could use javascript to write the width/length of the image. but you cannot change these attributes witout reloading the page.
also you will need to use javascript to find out the width/height of the table each time before change the image's width/height.

hope this helps.
 
Make it a background image I think is what you ned to do perhaps. Then though you can only tile it to fill the table, which is O.K. just make a repeatin image.I don't think you want to make images any bigger ever, because they start to look crap!

You could do that, too by the way using innerHTML, without reloading the page. Give the cell an id then change it's code by:


document.all['cellID'].innerHTML = '<img...height=&quot;&quot; width= &quot;&quot;'>


But you would need to detect it's dimensions first, then write them in...That is if you really want to do that, but I reckon it will make the iagse look bad - try:


<td style=&quot;background-image:url('myImage.gif')&quot;>


you can adjust the tiling using:
- background-repeat -->no-repeat or repeat-y or no-repeat
- background-position --> left or top or right, or combos like right top etc..
- background-attachment -->fixed lets you scroll over it.

&quot;Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer&quot;
 
>you could use javascript to write the width/length of the image. but you cannot change these attributes witout reloading the page.
also you will need to use javascript to find out the width/height of the table each time before change the image's width/height.

How would I write the code to do this?
Could you send me a sample code?

whttiger
whttiger@whttiger.zzn.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top