I am trying to remove some unwanted spacing that exists after a textarea.
In this example (in Chrome) a small space exists after the textarea and none after the input.
In Firefox I can see spacing after both.
It doesn’t seem to be linked to border css.
I have tried several outline options.
Anyone have a solution?
.it{
min-width: 100%;
border: none;
background-color: lightblue;
outline: none;
}
.it:focus{
border: none;
outline: none;
}
<div>
<input class="it"/>
<textarea class="it"/></textarea>
<input class="it"/>
<textarea class="it"></textarea>
</div>
2
Answers
I think you can put specific height to textareas and user can expand it they want.
margin: 0;
removes a little bit of margins but not all of them.A classic, this is not about textarea elements, this is about spaces characters around.
see also : How to remove the space between inline/inline-block elements?