Jump to content

Clipping images....


Guest Kyuzio

Recommended Posts

Hi!I'm trying to clip an image that is being inserted into a table cell. The image is being selected dynamically and may or may not fit inside the cell. I've tried using the overflow property to clip the image(overflow:hidden) but no luck. I've tried using the clip property to the dimensions of the cell (clip: rect(0 350px 60px 0)). Still no dice.I've tried setting up divs and ilayers with same properties. Even used position property - I read somewhere that clip needs to have the element positioned absolutley. Nada.Everything I've tried to do in regards to clipping the image have been ignored by my browsers (IE6 and Firefox 1.04) - except the absolute positioning, that does move the image to the top left corner of my page. I can affect any other property of the image and table cell that I need to, but it just ignores anything having to do with clipping.Here's the last version of my code I tried:<table> <tr> <td style="background-color: #ffffff; width: 350px; height: 60px; overflow: hidden; vertical-align:middle;text-align:center;"> <img src="ChosenImage.gif" border="0" /> </td> </tr></table> I have tried moving the code out to the table tag, also. I'm constrained in that I can only use inline style tags and not style sheets (company policy - don't ask me why, I just work here.)Hope someone can tell me what's wrong here...I'm going insane! :)

Link to comment
Share on other sites

WOW there is the supidest company policy I have ever heard...it might as well say"It is our goal to make things take as long as humanly possible, make the code bloated and hard to read, and waste client's time and money while taking insanely long to edit a page":) :)If find that hard to believe. Have any of these points been mentioned to them????

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...