Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Flexbox lightbox, help with css please.

LEGEND ,
Jan 11, 2017 Jan 11, 2017

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 .

881
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 11, 2017 Jan 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.

Translate
LEGEND ,
Jan 11, 2017 Jan 11, 2017

Should have said -

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

BTW - Any comments on this would also be welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2017 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 11, 2017 Jan 11, 2017

margin: 300px? should be 0

@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;

-webkit-box-shadow: none;

-moz-box-shadow: none;

-ms-box-shadow: none;

-o-box-shadow: none;

box-shadow: none;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 11, 2017 Jan 11, 2017

Thank you Jon and Os,

I placed that in the code to fix the no flex wrap support problem with the old flexbox syntax on iOS 1 to 6 and Android 2 to 4.

Looks like I will have to forget trying to offer a better experiance for those older devices, and trying to simulate flex wrap, and just leave them to display the images vertically.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2017 Jan 11, 2017

You could use BS

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2017 Jan 11, 2017

LOL.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 11, 2017 Jan 11, 2017

BenPleysier wrote:

You could use BS

Why do something easy when I can make it difficult

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2017 Jan 11, 2017
LATEST

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines