[SOLVED] Styling sliders with CSS

0 favourites
  • 7 posts
  • Hey all! I'm working on an editor for game content, and have managed to make a nice-looking UI using the in-built form elements, styled with CSS - but I can't get sliders to style at all! They respond to css in weird ways, for example, changing the border-radius seems to simply extend and slightly the rail of the slider.

    Anyone had any success styling their sliders with CSS?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The first relies heavily on extensive use of plugins (which is incompatible with the goals of this project), the second doesn't work for slider-bars Thanks though! I've managed to get the rail to style using "webkit-appearance: none" but that's all so far.

  • The first relies heavily on extensive use of plugins (which is incompatible with the goals of this project), the second doesn't work for slider-bars Thanks though! I've managed to get the rail to style using "webkit-appearance: none" but that's all so far.

    ah that is because sliders dont take CSS if i remember correctly, someone said something about that in a very old post! i think was ashley. i would do a custom slider bar though.

    just use the loading % rule usage.

    sorry for giving you those dead end links ... forgot sliders arent working 100% (css wise atleast)

  • The first relies heavily on extensive use of plugins...

    There is actually only one incomplex plugin - CSS Import ..

    when you open runtime.js you will see Import CSS function & Remove CSS function

    to avoid using the plugin. you can write this function in Browser: Execute Javascript

    not best way..but anyway... just for fun..

    Browser_Import_CSS.capx

  • you can write this function in Browser: Execute Javascript

    not best way..but anyway... just for fun..

    Browser_Import_CSS.capx

    Just what I was looking for! I'll get down to it now...

  • Just to holler back; the above example from korbaach is exactly what was necessary to allow me to style my sliders (and anything else in the page that was being a bit awkward) without using plugins. Several testing phases (so a good few hundred runs) in and it still hasn't once failed to correctly style my widgets. Very happy.

    Many moons of happiness upon korbaach

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)