Paul-D Posted 14 hours ago Share Posted 14 hours ago I know this is a simple one for you but I would like to display images on a web page but this is a large image. Can I put it in a container that fixes it's size. <body> <a href="BillBen.jpg">It's a plant.</a> </body> I might want to contain mp4 videos in this also. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/330010-simple-on-how-to-shrink-jpgs-on-a-webpage/ Share on other sites More sharing options...
maxxd Posted 1 hour ago Share Posted 1 hour ago If it's a very large image, you'll be better off resize it in an image editor and save the download time and bandwidth. Images should only be (about) as big (in pixel dimensions) as they're going to appear on the page at 100%, otherwise you're degrading the image integrity by resizing it in CSS. If it's just a little bit bigger than 100% (say, 10-20% maybe), you can give the image an id and use CSS to define the dimensions. Or, in a pinch, use the height and width attributes. Quote Link to comment https://forums.phpfreaks.com/topic/330010-simple-on-how-to-shrink-jpgs-on-a-webpage/#findComment-1657694 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.