question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Images display with a height of 1px on Chrome-y browsers

See original GitHub issue

I use Slick on therainbowroll.com and it works like a charm except for one weird bug on Chrome (or Chromium). For some reason, subsequent slides render at 1px high, making them essentially invisible. This is probably a Chrome bug since it works wonderfully on Safari & Firefox, but I still wanted to see if anyone has a way to avoid this.

Here’s how I configure Slick:

$(document).ready(function () {
  $('.images').slick({
    dots: true,
    slide: 'img',
    lazyLoad: 'progressive',
    responsive: [
      {
        breakpoint: 760,
        settings: {
          arrows: false
        }
      }
    ]
  });
});

Anyone seen this before? Is there a fix?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:73 (10 by maintainers)

github_iconTop GitHub Comments

33reactions
tokantcommented, Feb 6, 2015

I had the same issue but simply adding height:auto; to the img seems to work.

14reactions
kevnkcommented, Feb 25, 2015

I’m experiencing this issue in Chrome Version 40.0.2214.115 (64-bit) Mac.

Here’s my fiddle: http://jsfiddle.net/kevinkirchner/y3ns3kff/ — sometimes the bug shows, sometimes it doesn’t - check all four slides. Maybe has something to do with running slick before the images have completely loaded?

FIXED: I’ve confirmed that .slick-slide { height: auto; } fixed the issue for me — thanks @tokant

Read more comments on GitHub >

github_iconTop Results From Across the Web

How come in IE 8, my images are 1px tall? - Stack Overflow
In Firefox/Chrome/Safari, this image will display correctly. But in IE, the picture is only 1 pixel tall (but the width is 150).
Read more >
Troubleshooting 1px margin difference Chrome v. Firefox
Hey guys, Can you please just give me a big list of things I can do to figure out why a list element...
Read more >
How to determine the size of the images in your feed
Open the page with your feed in Chrome. · Right-click the image whose size you want to know and select Inspect. · View...
Read more >
Image has 1px padding between border sometimes ... - Reddit
I have 100% zoom set in browser (Chrome) but I can see that image has 1px space before border on some sides (not...
Read more >
border-image - CSS: Cascading Style Sheets - MDN Web Docs
The border-image CSS property draws an image around a given element. ... some browsers don't render the border image if border-style is none ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found