I have a DIV in which people can upload and display images. If the image is square or rectamgle the image is displayed fine. However if a user uploads a image which is very tall and very narror then the whole display of the site is messed up.
Is it possible to prevent people from uploading images of a certain dimension. For example it cant be 25px wide by 100px height?
Or is there another option I can use?
Setting conditions like that would require a server-side script. With CSS, you can just determine how the uploaded content displays. You could, for example, set a min-width for the image (say 50% or 100% width of the container) and set a max-height to the container, and overflow: hidden to cut off some of the image.
This topic is now closed. New replies are no longer allowed.