0
votes

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)

3

3 Answers

1
votes

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;

0
votes

This is code that i have changed use css

img { border: 1px solid #fff000; }

and code

<div style="width:998px; height:248px;">

    <!-- CAN'T EDIT THIS BLOCKS FROM -->
    <a href="#">  
        <img width="1000" height="250" border="0" src="http://oboshto.ru/upme/shits/banner1000.jpg" alt=""></img>
    </a>
    <!-- TO -->

</div> <!--  << editable -->
0
votes

http://jsfiddle.net/5JjQW/ check this code you can set with

    <div style="position: absolute;border: 1px solid #f00;width:998px; padding:2px; height:248px;">


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


</div>