D
D
Dutymy2021-07-15 18:36:34
css
Dutymy, 2021-07-15 18:36:34

Why is the input the wrong width?

Hello, I want the input to be 30vmin wide - that is, the container to be like the maximum-large element - (counter) and the input to be a block, and this works until the scale increases more than 300%. Then everything breaks down. How can I fix this... make it so that the input is never the largest element in the block

<div class="main">
  <div class="counter"></div>

  <input type="range" />

</div>
<style>
  .main {
    width: max-content;
  }

  .counter {
    width: 30vmin;
  }

  input {
    width: 100%;
  }
</style>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Mazikin, 2021-07-15
@DancingGod68

Remove the styles for main and everything turned out

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question