Question

Noob here. At what size i.e. width and height should I load a small pic that represents an icon link i.e. Home, Sitemap icons. Is there a universal width and height that won't crop the image when it renders in different browsers? thanks, I usually set them at 88 x 88.

Was it helpful?

Solution

<img src="dog.jpg" alt="Image of a dog" title="A dog running happily around" height="42" width="42"><img src="dog.jpg" alt="Image of a dog" title="A dog running happily around" height="42" width="42">

make sure there is no space between the > < img tags

OTHER TIPS

No a browser will not crop an image. There is nothing to worry about this. If you are new to this i would advise you to get used into putting Alts, Title (for SEO - Search Engine Optimization) as well as the size of your images.

<img src="dog.jpg" alt="Image of a dog" title="A dog running happily around" height="42" width="42">

If your image appears cropped, that might be because of your CSS. On Chrome for example right click on the image and select 'Inspect'. Then check on the bottom left under the Styles tab to see if there is any style that affects your image. You can unclick the styles to see if one of these causes your image to get cropped. If that's the case just edit your css accordingly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top