View Full Version : Need some CSS help to crop images
Harold Mansfield
07-03-2013, 12:27 PM
Just like the title says, I have a defined area for an image, but I'd like to be able to show a cropped version of whatever image size is uploaded.
So basically if I upload an image that's 600x600, I only want to show a 600x300 area of it, without having the image distort. A crop.
Does anyone know how to do that with CSS?
It would be greatly appreciated.
Thanks in advance.
vangogh
07-03-2013, 02:33 PM
If you've set the wrapper around the image to 600x300 and then set that wrapper to overflow: hidden in your css, I think it'll do what you want. If that doesn't work, let me know and I'll play around with it a little more. What you want can definitely be done.
Harold Mansfield
07-03-2013, 02:41 PM
If you've set the wrapper around the image to 600x300 and then set that wrapper to overflow: hidden in your css, I think it'll do what you want. If that doesn't work, let me know and I'll play around with it a little more. What you want can definitely be done.
This was my original approach too, but I don't have access to wrap the image individually. Well, I take that back. I guess I do. I'm basically trying to crop the way the featured image is displayed in the WordPress loop, specific to one instance of it. Not across the site.
I see where you are coming from with it though. I'll play around with it.
Thanks.
vangogh
07-09-2013, 11:38 PM
Have you gotten this to work? If not let me know. Send me an email or give me a call. I'm sure I can figure it out.
Harold Mansfield
07-10-2013, 12:25 AM
Have you gotten this to work? If not let me know. Send me an email or give me a call. I'm sure I can figure it out.
It was for a project that I was subbing on. My part is done now, but I did send the project manager an email with your suggestion.
Thanks
vangogh
07-10-2013, 02:45 AM
Glad you're not still worrying about it. I felt bad that I didn't respond again sooner.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.