Follow

Possible CSS Edits?

Is it possible to adjust the width (max-width: and min-width:) attributes in the timeline.css to override what's being brought in? I've attempted to re-write my own CSS in a custom style rule, but since it's being loaded into an <iframe> I seem to be unable to affect a change.

Specifically, I am trying to maximize the max width of the .content-container .media DIV and minimize the with of the .content-container .text DIV.

Is this possible?

Thanks!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

1 Comments

  • 0
    Avatar
    Joe Germuska

    The preferred way to take control of the CSS for a timeline is to embed the timeline directly in your page, not using javascript. (see https://github.com/NUKnightLab/TimelineJS for more information)

    Technically, it is possible to add a 'css' parameter to the iframe embed src URL which points to your own CSS file. If you do this, it will completely override the normal CSS file, so you would have to begin from a copy of  http://cdn.knightlab.com/libs/timeline/latest/css/timeline.css rather than simply specifying a file which overrides some of those rules.

    Also (for reasons that are not clear to me because they predate my involvement in the project), if you want to override the CSS, you must specify a 'js' parameter as well. It should be fine to use  http://cdn.knightlab.com/libs/timeline/latest/js/timeline-min.js for this

    In my casual testing, I didn't worry about URL escaping the parameters, but for safety's sake you probably should. One easy way to encode the URLS is http://meyerweb.com/eric/tools/dencoder/

    Hope this helps.

Please sign in to leave a comment.
Powered by Zendesk