mazman13 Posted October 1, 2008 Share Posted October 1, 2008 Lets say I have a section on my layout for a "headline" picture. 125 x 125 And in my backend I can upload a news story with a picture or no picture. If I upload a picture, can I get CSS to resize it or crop it to fit in the 125 x 125 space... without it getting all warped? I'd rather have CSS do this than resize each image in photoshop if I want to upload something. What is the best way? Quote Link to comment https://forums.phpfreaks.com/topic/126624-solved-can-i-resizecrop-an-image-to-a-fixed-layout-section-with-css/ Share on other sites More sharing options...
dropfaith Posted October 1, 2008 Share Posted October 1, 2008 not without it getting warped you can set width or height to 125 and it wont get warped but to force both is a bad idea plus why waste the load time of a full sized image if you only want it 125 by 125 look up a php script that creates thumbnails on the fly. Quote Link to comment https://forums.phpfreaks.com/topic/126624-solved-can-i-resizecrop-an-image-to-a-fixed-layout-section-with-css/#findComment-654783 Share on other sites More sharing options...
ifubad Posted October 1, 2008 Share Posted October 1, 2008 . Quote Link to comment https://forums.phpfreaks.com/topic/126624-solved-can-i-resizecrop-an-image-to-a-fixed-layout-section-with-css/#findComment-654827 Share on other sites More sharing options...
dropfaith Posted October 1, 2008 Share Posted October 1, 2008 .? Quote Link to comment https://forums.phpfreaks.com/topic/126624-solved-can-i-resizecrop-an-image-to-a-fixed-layout-section-with-css/#findComment-654831 Share on other sites More sharing options...
ifubad Posted October 1, 2008 Share Posted October 1, 2008 oops anyway, example of setting thumbnail size dynamically http://www.waiming.com/pages/catalog.php like dropfaith mentioned, you can use php. The thumbnails within the above page are all 250px x ???, resized to 125px x ??? on the fly, that's the easy part. Quote Link to comment https://forums.phpfreaks.com/topic/126624-solved-can-i-resizecrop-an-image-to-a-fixed-layout-section-with-css/#findComment-654853 Share on other sites More sharing options...
mazman13 Posted October 1, 2008 Author Share Posted October 1, 2008 Ok cool! Thanks Quote Link to comment https://forums.phpfreaks.com/topic/126624-solved-can-i-resizecrop-an-image-to-a-fixed-layout-section-with-css/#findComment-654888 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.