You basically have two options - hard-code the <img> tag with width & height to prevent malformation of layout, or specify the min- and max-width.
Or use this:
The browser will automatically do the resizing for you and ensure it fits within those parameters. You don't have to write code to inspect the picture size, perform picture resizing, or limit your end-user. This also solves the problem if a picture is missing and prevents the browser from putting in a default size.
This doesn't ensure the picture will look great...but it will keep your layout squeaky clean and looking as you intended!
Recognized by:
0 comments:
Post a Comment