J
J
jacobshamr2021-03-27 04:03:56
css
jacobshamr, 2021-03-27 04:03:56

Where do indents come from?

Hello, this is the code (at 500% scale)

<!DOCTYPE html>

<body>
  <div>
    <div class="text">123321123321</div>
    <input type="text" />
  </div>
</body>
<style>
  .text {
    font-size: 1.75vmin;
    color: red;
  }

  input {
    width: 100%;
    height: 4.5vmin;
    background: green;
  }
</style>

</html>

Creates some indents, how can I fix this
605e8478439e9376018089.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danny Arty, 2021-03-27
@DanArst

Because you set the values ​​in vMin.
Set the height of the input as a percentage, for example, and the font size in VW.
PS: it seems that this is a problem (or bug) not in all browsers was observed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question