Search code examples
csstimeline.js

Closing up spacing in Knight Lab's Timeline JS


Using Timeline JS, I can't find the CSS needed to close up the vertical space between the items and the top of div & timeline. I've made some CSS edits already, but can't see what to target to close up this space. See attached.

Stack Exchange insists I write more here, though I've already asked my question.


Solution

  • Height is set when calling the div:

    <div id='timeline-embed' style="width: 100%; height: 450px"></div>
    

    Then slides' space is calculated as 450px - 165px = 335px. This is the available space for slides, and experimenting with the height setting allows you to find the optimum setting to close up the extra space.