-1

I'd like to specify the background color of flags for each group I define in the json file in Timeline.js. I'm able to change the background of each slide, depending on the group it belongs to, but the documentation's not clear (to me, at least) on how to go about customizing a group's flags' background color. ".tl-timemarker-content-container" selects for ALL flags. How do I go about adding custom selector css to affect all div/span elements belonging to a group? Thanks!

.tl-timemarker-content-container {
    background-color:#cc0000 !important;
}

1 Answers1

0

Try

div.tl-timemarker-content-container, span.tl-timemarker-content-container { background-color: #cccccc; }

Let me know if that’s what you’re looking for

Joe Pigott
  • 7,981
  • 6
  • 31
  • 43
K4ll-of-D00ty
  • 153
  • 2
  • 13
  • Hi, thanks for this. But wouldn't this affect all markers/flags on the timeline? I have defined groups in the json file: "background": { "color": "#cccccc" }, "group":"Row1" ... "background": { "color": "#333333" }, "group":"Row2" ... All slides belonging to Row1 will have a background of #cccccc and all slides belonging to Row2 will have #333333. But this affects only the slide backgrounds. I can't make it, so that all timeline markers/flags for Row1 will also have a background of #cc0000 and Row2 flags would have #333333. Thanks. – john-pu Jan 27 '19 at 19:14
  • Hv u tried it? Not sure I quite understand it tbh.. especially on the .js and .json things. But to style an element, you typically has to just get the selectors right and apply the styling. Maybe you should google things up. Sorry, maybe others can help too.. – K4ll-of-D00ty Jan 27 '19 at 19:22
  • Hi, for the sliders, yes I have tried. I'm able to set the background color per group. But no luck for the flags on the timeline itself. I was hoping maybe someone figured a hack or something. Anyway, thanks! – john-pu Jan 27 '19 at 19:48