avazwij avazwij - 1 year ago 50
CSS Question

adjusting input element inside div

I have a main

<div>
inside which there are a left and right ones.

On the left one, I have an
<input type = "text">
.

my problem is that the width and height of the
<input>
element look larger than its container which is the left
<div>
.

please help me out with the input element.

DEMO

Answer Source

A native input has padding and border applied to it.

Add this to your input CSS:

border: 0;
box-sizing: border-box;