<a href="index.html"><img src="image.png"/></a>
IE8 highlights the image with a blue border. I'm not sure what CSS is relevant here, is it just border? Can I use a single CSS style to turn it off, like:
a img { ... }
When you add a hyperlink to an image in HTML it will automatically display with a blue border around that image. We dont want it because it makes our page look ugly and unprofessional.
You can use Padding in your style attribute or CSS class. Show activity on this post. Padding allows you to control the space between your image and its border. Padding is just one piece of a larger concept, the CSS Box Model, which includes the content, padding, border and margin.
Adding border="0" to your img tag prevents that picture from having a border around the image.
Use this css:
a img { border:none; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With