change the length/color of the slider

PennController for IBEX Forums Support change the length/color of the slider

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6394
    August
    Participant

    Hi Jeremy:

    May I ask how to change the length (size) or color of the slider? I tried to add .size() and .color() as below, but they don’t work…I really want to make the slider longer, because the default size is a bit too short

    newScale("slider1", 100)
        .settings.slider()
        .settings.horizontal()
        .color("red")
        .size(1000)
        .before(newText('Very unlikely  '))
        .after(newText('   Very likely'))
        .print()
        .log()

    Thanks so much!

    Best wishes,
    August

    • This topic was modified 3 years, 4 months ago by August.
    #6397
    Jeremy
    Keymaster

    Hi August,

    Apparently there is a max-width CSS property that’s being set to content in some versions of PennController, which limits the maximum size you can pass. Just add .css("max-width", "unset") after your size command and that should do the trick

    As for the color, the default rendering of the slider is handled different by each browser. If you want to modify its aesthetics, you’ll have to do some CSS magic

    Jeremy

    #6398
    August
    Participant

    Thanks so much, Jeremy!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.