jQuery UI Widgets Forums ASP .NET MVC Slider width in percentage

This topic contains 3 replies, has 3 voices, and was last updated by  Martin 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Slider width in percentage #115255

    Pietervk
    Participant

    Hi,
    My web app is sized in css to accommodate different form factors. I would like to use the slider, but there seems to be only a way to set the width in pixels. Is there a way to set the width in percentage, or put it in a fluid div?

    Thanks

    Pieter

    Slider width in percentage #115261

    admin
    Keymaster

    Hi Pieter,

    Did you use its “width” property or you set it with CSS?

    Best regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/

    Slider width in percentage #115271

    Pietervk
    Participant

    Hi Peter,
    with CSS does not work.
    The width property is an Int, so 80 means 80px I presume, not 80%. The slider has all kind of divs, where the size is fixed, and it seems calculated based on the overall size.

    To make it a percentage, I assume you have to get the browser size, then calculate the width and use that.

    Thanks

    Pieter

    Slider width in percentage #120148

    Martin
    Participant

    Hello Pieter,

    The width property also accepts string, so you can set a percentage.
    Please, check this Example.

    Best Regards,
    Martin Yotov

    jQWidgets Team
    https://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.