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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cropping an image?

Status
Not open for further replies.

mpalmer12345

Programmer
Feb 16, 2004
59
US
Cropping an image?

Is there some way to crop an image file in HTML or Javascript? In other words, is there a way you can present a portion instead of the entire image? If possible, I would like to present differently cropped parts of the same image in a table. I would prefer not having to make a new file for each cropped image, as there will be quite a few of them.
 
Yes.

Investigate the clip, and overflow properties of a DIV element. This would allow you to show only portions of an image, and change those portions without reloading the image.

Dan
 
Thanks for this everso much!

I wish at least one of the five books I have on Javascript would have explained this to me. Ah well. Somebody needs to write a book about Programming for Artists, which skips all the dull, market-oriented stuff and gets straight to the fun stuff.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top