Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vertical spacing between images

Tags:

html

I cut one image to three equal images and now I have it in the html code like this:

                        <img src="images/disclosure2_01.jpg" alt="Disclosure">
                        <img src="images/disclosure2_02.gif" alt="Disclosure2">
                        <img src="images/disclosure2_03.gif" alt="Disclosure3">

The images render at the website like this: enter image description here

I want to know if its possible to remove that vertical spacing between the images and the images to look like one whole picture. Thanks in advance for your help.

like image 635
Laziale Avatar asked Oct 18 '25 23:10

Laziale


2 Answers

The vertical space is because the property "display" is "inline", it is solved leaving the font size at zero, in its parent element. Or changing the display property to the images to "block".

<div style="font-size:0">
   <img src="images/disclosure2_01.jpg" alt="Disclosure">
   <img src="images/disclosure2_02.gif" alt="Disclosure2">
   <img src="images/disclosure2_03.gif" alt="Disclosure3">
</div>
like image 179
chuchurex Avatar answered Oct 22 '25 06:10

chuchurex


try this. Remove the lines between them.

<img src="images/disclosure2_01.jpg" alt="Disclosure"><img src="images/disclosure2_02.gif" alt="Disclosure2"><img src="images/disclosure2_03.gif" alt="Disclosure3">

or tinker with css.

img { padding: 0; margin: 0; } 
like image 45
Satish Avatar answered Oct 22 '25 05:10

Satish