oboshto oboshto - 7 months ago 10
HTML Question

Border 1px for image with border:0; without js

I have a banner with 1000px of width and 250px of height.

<a href="#">
<img width="1000" height="250" border="0" src="http://oboshto.ru/upme/shits/banner1000.jpg" alt="">
</a>


and I can't edit the image and link code. But i can add custom code before and after banner.

How can I set 1px banner border?

Look at my jsfiddle

My code doesn't look good (look at border-bottom and border-right, but banner size is right)

Answer

your border is there, the reason it's not on the right and bottom is your container has width:998px; height:248px; but your image has width="1000" height="250" either add two more pixels to your container so that the image isn't breaking out or set the container to overflow:hidden;

Comments