Centering a lightbox - Page 1

User 458539 Photo


Registered User
1,625 posts

Forum,

I'm using Visual Light Box 6, RLM, CC's HTML Editor.

Using light boxes extensively in a site - everything working ok but I can't seem to center the light box thumbs. They are working fine and depending on the scene size they are centered, which makes sense but a little bit of an illusion as every time a break point crosses you can see that it isn't really centered. Using a buttom element and centering that but its within the div.

Hope it makes sense

Thanks in advance

Byron
User 187934 Photo


Senior Advisor
20,245 posts

Link please.;)
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
User 458539 Photo


Registered User
1,625 posts

User 187934 Photo


Senior Advisor
20,245 posts

I don't see any thumbnails being used in your lightbox.
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
User 458539 Photo


Registered User
1,625 posts

Maybe I'm using the wrong terms - when you open the page there are 5 pieces of furniture on that page - I was calling it thumbs as the toolbox for the software was using that term. When you click the thumb it goes to a larger picture - just as its supposed to. I have a picky client (are there any other kind?) that is wanting those centered. On the opening screen size its not centered on my monitor - my test monitors and his

It all works fine its just that one centering point.

Thanks

Byron
User 187934 Photo


Senior Advisor
20,245 posts

Perhaps.
#vlightbox1 {
text-align: center;
width: 100%;
}
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
User 458539 Photo


Registered User
1,625 posts

Will try

Thanks
User 2023679 Photo


Registered User
141 posts

Eric's solution is spot on. I was having that same issue on my visual lightbox pics. In my custom.css I made a class for . . .

.text-center {
text-align:center;
}

I didn't set the width at 100% however. It didn't seem to need that, but I could be wrong. Its been working fine without that at present. In any case, here is my test page . . .

http://brosepianoservice.com/lightbox-test.html

It's only 3 photos, but they stay centered, and as you shrink the browser they stay centered throughout, all the way down to cell phone size.
User 458539 Photo


Registered User
1,625 posts

Thanks guys!!
User 458539 Photo


Registered User
1,625 posts

Eric -

Bit embarrass ing as i cant get this to work. Where did you place this code?

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.