- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Dear CSS-Tricks members,
Today at work there was a discussion about creating an image in a diamond shape without cutting the image! This is because the image must be changed in the CMS by the customer.
Created a simple jsfiddle to show you guys the problem. http://jsfiddle.net/gFtm2/4/
I really hope there is a way to get the job done, with CSS ofcourse!
Thanks,
Niels
I don’t know how you plan to make an image a non-square AND not crop the image?
Unless I don’t understand, this defies logic and physics.
I think he means without actually amending the image.
I don’t know either, that’s why I came here. To ask the community of CSS-Tricks if there was a way in CSS to ‘hide’ the corners in the way I created them in my jsfiddle example.
Here’s one way…note the image has to be larger than the containing div.
Thank you Paulie_D. That was already really helpfull. If there are other ways to get this done I would love to hear, or what the best way is to do this!