Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
Quiero desplazar toda mi división a 1400 px en una página web pero no funciona

Como puede ver, este es el código HTML de mi contenedor. Quiero desplazarme por esta parte pero no funciona.

 // This is the javascript for the slider function function slideRight() { var serviceCatalogue = document.getElementById('scroller'); serviceCatalogue.scrollLeft = 1400 }
 /* And this is the CSS for the conatiner. */ .conatiner { border: 1px solid black; width: 1000000000px; /* overflow: scroll; */ height: 500px; overflow-x: scroll; }
 <div class="conatiner" id="scroller"> <i style=" position:absolute; right: 50px; margin-top: 100px;" class="fas fa-arrow-right"> </i> <button id="left-button" swipe left </button> <button id="right-button"> swipe right </button> </div>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Creo que el problema es que tu .conatiner no tiene suficientes elementos para desbordarlo.

por ejemplo, en el código a continuación, #conatiner tiene #content que es más grande que el ancho del parrent #content tiene 500 px #conatiner tiene 400 px

Y funciona bien

 const button = document.getElementById('slide'); button.onclick = function () { document.getElementById('container').scrollLeft = 20; };
 #container { width: 400px; height: 500px; border: 1px solid #ccc; overflow-x: scroll; } #content { width: 500px; background-color: #ccc; }
 <div id="container"> <div id="content">Click the button to slide right!</div> <button id="slide" type="button">Slide right</button> </div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!