Omirion Posted August 23, 2010 Share Posted August 23, 2010 Hey there is there a way to stretch an image with CSS. I have div the has a width of 50% and a height of 10%. Is there a way to fit the image in the div with CSS only? Quote Link to comment https://forums.phpfreaks.com/topic/211556-stretch-image-with-css/ Share on other sites More sharing options...
Omirion Posted August 23, 2010 Author Share Posted August 23, 2010 Never mind got around it. Inserted the img as an html and gave it a position:relative; height:100%; width:100%; This only works if you don't need to keep the aspect ratio. Quote Link to comment https://forums.phpfreaks.com/topic/211556-stretch-image-with-css/#findComment-1102918 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.