Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

182
Vistas
Slider bug in html

I was coding in html when I encounterd a simple problem. I am a beginner so i take most of my stuff from w3schools and for some reason this code did not work.

var slider = document.getElementById("myRange");
var output = document.getElementById("demo");
output.innerHTML = slider.value; // Display the default slider value

// Update the current slider value (each time you drag the slider handle)
slider.oninput = function() {
  output.innerHTML = this.value;
}
div {
    height: 200px;
    width: 400px;
    background: black;

    position: fixed;
    top: 50%;
    left: 16%;
    margin-top: -100px;
    margin-left: -200px;
}
  <link rel="stylesheet" href="uwu.css">
<body>

    <center><h1>How old are you?</h1></center>


  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  <div class="slidecontainer">
    <input type="range" min="1" max="18" value="1" class="slider" id="myRange">
  </div>
  <script src="slider.js"></script>

</div>

If you were also wondering jQuery is not added.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

because you have no output add a header and give it id of demo

about 4 years ago · Juan Pablo Isaza Denunciar

0

I would rather do the width and heigth in the css with %, because px is a value that sometimes breaks if we make the screen smaller. But I can not answer the exact question about "Slider bug in html". You can look in the Net for some info. ;-)

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda