Margins between Lightbox Pictures -...
I have a lightbox set up, but would like to separate the pictures more than they are. I just want a bigger space in between each picture. What code do I put, and where?
This is what I have in the header...
<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/lightbox.js"></script>
<script src="js/jquery.smooth-scroll.min"></script>
<script src="js/jquery-ui-1.8.18.custom.min"></script>
<script> jQuery('a.gallery').colorbox(); </script>
And in the body...
<a href="photo2.jpg" rel="lightbox[set2]" ><img src="photo2thumb.jpg" /></a>
<a href="photo3.jpg" rel="lightbox[set2]" ><img src="photo3thumb.jpg" /></a>
This is what I have in the header...
<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/lightbox.js"></script>
<script src="js/jquery.smooth-scroll.min"></script>
<script src="js/jquery-ui-1.8.18.custom.min"></script>
<script> jQuery('a.gallery').colorbox(); </script>
And in the body...
<a href="photo2.jpg" rel="lightbox[set2]" ><img src="photo2thumb.jpg" /></a>
<a href="photo3.jpg" rel="lightbox[set2]" ><img src="photo3thumb.jpg" /></a>
If you provide a link I can probably advise you.

I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Add this to the head of your page.
<style type="text/css">
img{
margin:2px;
}
</style>
img{
margin:2px;
}
</style>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Thank you!
Just a note on this.. I noticed that the higher you make the margin, the more it is cut off when you enlarge it. I changed it to margin:10px and the right/bottom sides grew smaller
Just a note on this.. I noticed that the higher you make the margin, the more it is cut off when you enlarge it. I changed it to margin:10px and the right/bottom sides grew smaller
This adjust the margin on all sides at the same time.
margin is in this order top right bottom left.
Your image holders could use some id's or classes assigned to them to have better control over which ones get how much margin and where.
<style type="text/css">
img{
margin:2px ;
}
</style>
img{
margin:2px ;
}
</style>
<style type="text/css">
img{
margin:1px 2px 1px 2px;
}
</style>
img{
margin:1px 2px 1px 2px;
}
</style>
margin is in this order top right bottom left.
Your image holders could use some id's or classes assigned to them to have better control over which ones get how much margin and where.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.