JOIN DEVPPL

It looks like you are new here. If you want to get involved, click on Join below!



images border


M

keyboard_arrow_up
0
keyboard_arrow_down


First Post Mark as Spam mielke
Posts: 3 - Registered: 2011-10-02 20:08:32

I have a series of images inline and want a 10px border around them all. The problem is that they are all at random heights .

If I simply add a border to the image then the border width is twice as thick inbetween images (which i don't want) see below.

<img style="height:300; border-style:10px solid white" src="test1.jpg"><!--
--><img style="height:200; border-style:10px solid white" src="test2.jpg">

Or if I put them in a table and use border collapse then the top border isn't inline with the top of the image, its inline with the top of the table. see below...

<table style="border-collapse:collapse;"><tr>
<td style="border:10px solid white;"><img src="test1.jpg"</td>
<td style="border:10px solid white;"><img src="test2.jpg"</td>
</tr></table>

I don't care how its done as long as there is a border around each image where the height of each image is different and the border isn't double in between images.

Thanks




R

keyboard_arrow_up
0
keyboard_arrow_down


Reply #1 Mark as Spam reinerthvanesa
Posts: 2 - Registered: 2013-03-31 11:18:06

You can change border-style to border...I cannot see another issue...




R

keyboard_arrow_up
0
keyboard_arrow_down


Reply #2 Mark as Spam reinerthvanesa
Posts: 2 - Registered: 2013-03-31 11:18:06

You can write it like this:
<table style="border-collapse:collapse;" width="800" height="700">
<tr>
<td style="border:10px solid white;">
<img src="dodo1.jpg" style="height:300; border:10px solid white;">
</td>
<td style="border:10px solid white;">
<img src="dodo.jpg" style="height:300; border:10px solid white;">
</td>
</tr>
</table>




G

keyboard_arrow_up
0
keyboard_arrow_down


Reply #3 Mark as Spam gabriellima
Posts: 3 - Registered: 2013-09-21 16:14:20

You can create a class at css to set this style and put in the tag img this class, so this way you dont need to write the style of all images of your site like this:

.img_class{ border:10px solid white;}


<img src="dodo.jpg" class="img_class">

I hope that i could help!






JOIN DEVPPL

It looks like you are new here. If you want to get involved, click on Join below!




MENU
Advertising