开发者

Can anyone help polish padding/margin issues with this implementation of Galleria.js?

开发者 https://www.devze.com 2023-02-18 02:52 出处:网络
I can\'t for the life of me figure out why the padding/margins around the images in this PregoApp slideshow theme are not even. No matter what I do to the CSS, nothing seems to fix it reliably.

I can't for the life of me figure out why the padding/margins around the images in this PregoApp slideshow theme are not even. No matter what I do to the CSS, nothing seems to fix it reliably.

Here's the site.

And this site also uses the same implementation but has been tweaked to look right since all the images are the same size: http://mansfieldgallery.co.nz/

Is there a better way to do this? Any tips would be greatly appreciate开发者_运维技巧d.


As I understand, you don't like that, when image is not do wide as other the padding do not change and always stays the same, right?

I used Opera Dragonfly to investigate why is that, and when you look at <div class="galleria-container" /> you can find that styles of this element are: style="width: 578px; height: 399px;".

So either jQuery/JavaScript set this styles after page load and it stays the same all the time or you was the one who set it like that. No wonder why padding is constant.

Possible Solutions:

  1. Always use images with the same width and height.
  2. Make changes to the script that it would change width of <div class="galleria-container" /> to fit the actual image.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号