12322

slick images become 1px height

Question:

I have been trying to get a slick slider to work for a few hours now, and after trying all the suggestions on relevant SO questions, nothing has worked.<br /> My images are 1080px tall, but slick displays them as 1px tall.<br /> FYI, the images have enough transparent space at the bottom and I am planning to move the dots up on top of the image to keep the page without scroll bars. I am also planning to make the navigation arrows smaller, though they should still be on top of the image.

I have the entire slider having the full height as well as the everything within (.fullheight and .backimg).

<div id="picslider" style="height: 100%"> <a href="#" class="fullheight"><img src="https://octolopagon.games/_resources/img/olumian.png" class="backimg"></a> <a href="#" class="fullheight"><img src="https://octolopagon.games/_resources/img/support.png" class="backimg"></a> </div>

The full code is at <a href="https://jsfiddle.net/wrtvq2we/" rel="nofollow">https://jsfiddle.net/wrtvq2we/</a>

Any help is appreciated.

Answer1:

You should give the container where the slides are in a height, otherwise the height will always be 1px. So you can give .slick-track a height desired to your needs. Here's <a href="https://jsfiddle.net/pu20db6w/" rel="nofollow">an updated JSfiddle</a>.

The images that are inside the slider will grow (in height and width) to the set height of the container.

Recommend

  • Sending and Receiving SMS [closed]
  • Can I commit a file with git, but automatically ignore it when doing a git svn dcommit?
  • Testing facebook connect on localhost
  • Violates RFC 2109: host > minus domain may not contain any dots
  • How to produce a Code 39 that can be reliably read after faxing
  • How to pause a python script running in terminal
  • Help with one step build all projects + installer (.NET + WiX)
  • wrong item changes in recyclerview
  • How to expand parent div to account for child's overflow?
  • Highcharts - Column chart with empty columns for date in x-axis
  • What is this strange character in chrome's resource css viewer?
  • Is there any way to call saveCurrentTurnWithMatchData without sending a push notification?
  • C# List of Panels
  • Angular2 - Template reference inside NgSwitch
  • quiver not drawing arrows just lots of blue, matlab
  • Linq Merge lists
  • Zoom in and out of jPanel
  • D3 get axis values on zoom event
  • How can I enlarge video fullscreen without the affected interface project in as3?
  • print() is showing quotation marks in results
  • Make VS2015 use angular-cli ng at build time in a .NET project
  • OpenGL 3.3 on Mac OSX El Capitan with LWJGL
  • Python urlparse: small issue
  • Android fill_parent issue
  • Change multiple background-images with jQuery
  • Algorithm for a smudge tool?
  • FileReader+canvas image loading problem
  • How to rebase a series of branches?
  • Align navbar back button on right side
  • Get object from AWS S3 as a stream
  • Can Jackson SerializationFeature be overridden per field or class?
  • How to set/get protobuf's extension field in Go?
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • htaccess rewriting URLs with multiple forward slashes
  • How to show dropdown in excel using jrxml (jasper api)?
  • Display Images one by one with next and previous functionality
  • Web-crawler for facebook in python
  • A cron job substitute?
  • Android Studio and gradle
  • python draw pie shapes with colour filled