avazwij avazwij - 1 year ago 75
CSS Question

adjusting input element inside div

I have a main

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
element look larger than its container which is the left

please help me out with the input element.


Answer Source

A native input has padding and border applied to it.

Add this to your input CSS:

border: 0;
box-sizing: border-box;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download