Skip to main content
pziecina
Legend
January 11, 2017
Answered

Flexbox lightbox, help with css please.

  • January 11, 2017
  • 1 reply
  • 1190 views

Hi All, Help

I know I have done something wrong, but I cannot find what it is.

http://www.pziecina.com/lightbox/lightbox.html

I was creating a flexbox image gallery with a lightbox, for a possible demo in a future discussion. Which works, (sort of) but when I reduced the browser size to simulate smaller screens, (to work out the lightbox overlay, and positioning) I now have a large top margin after the initial text then after every 2nd image.

I can't work out if this is something to do with the flexbox css or my html code.

If you could take a look and offer a solution, (or even any suggestions) I would be grateful, it's probably something simple but after writing the css animation code I've gone code blind .

This topic has been closed for replies.
Correct answer Jon Fritz

In the dev tools, I'm seeing...

@media screen and (-webkit-min-device-pixel-ratio: 0) and (max-width: 800px)

ul.thumbs li:nth-of-type(2n+1) {margin 300px 0 0 3em;

...in lightbox.html line 321 as the culprit.

At least turning it off fixes it in Chrome.

1 reply

pziecina
pziecinaAuthor
Legend
January 11, 2017

Should have said -

This is happening in Chrome, FF is o/k.

BTW - Any comments on this would also be welcome.

Jon Fritz
Community Expert
Jon FritzCommunity ExpertCorrect answer
Community Expert
January 11, 2017

In the dev tools, I'm seeing...

@media screen and (-webkit-min-device-pixel-ratio: 0) and (max-width: 800px)

ul.thumbs li:nth-of-type(2n+1) {margin 300px 0 0 3em;

...in lightbox.html line 321 as the culprit.

At least turning it off fixes it in Chrome.