Forum Moderators: not2easy
For example, code on two lines:
<img src="images/image1.gif">
<img src="images/image2.gif">
will get you a result of two images, side by side, but with a 4-ish pixel gap between then, while code all on one line;
<img src="images/image1.gif"><img src="images/image2.gif">
will give you two images, side by side, with no gap between them.
I'm working on a site that will have several images output dynamically, side by side, and my dev team say they may or may not be able to get the code to be all on one line.
Therefore I've tried to apply styles to my images that gives the gap I want (2px) between the images, instead of the 4-5px that most browsers leave, regardless of how the code is laid out.
Is this possible?
My code (in very brief format without all the sexy extras like h and w etc!)
<img src="images/image1.gif" class="imageborder">
<img src="images/image2.gif" class="imageborder">
.imageborder { /* puts a 2px space on the right of an image */
border-right: green 2px solid;
border-left: 0;
}
It doesn't work tho - there is still a 2-3px gap after my sexy green border. :(
Does anybody know if this can work, or will I just have to either accept a wider gap between my images, or beg my dev team to find a way of outputting the code the way I want it?
Thanks in advance for ideas!
<p>This is the first line,
and this is the second.</p>
... should render as ...
This is the first line, and this is the second.
... and not ...
This is the first line,and this is the second.
... nor ...
This is the first line,
and this is the second.