oboshto oboshto - 1 year ago 93
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="">

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 Source

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;

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download