user6728960 user6728960 - 3 months ago 15
CSS Question

how to add overflow auto to input type in html

How to add auto scroll bar to input type.

here is my code.

<div class="email">
<input type="text" class="form-control" name="description" placeholder="description">
</div>

Answer

Give some padding to your textarea

textarea {
  resize: none;
  padding: 1em;
}

.phone, .email, .name, .description {
    margin-bottom: 4px;
}
.form-control {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
textarea {
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    border: 1px solid #ddd;
}
textarea {
	resize: none;
	padding: 1em;
}
<div class="col-md-3 requestfree">
	
	<div class="name">
		<input type="text" class="form-control" name="name" placeholder="Name">
	</div>
	<div class="name">
		<input type="text" class="form-control" name="phone" placeholder="Phone">
	</div>
	<div class="email">
		<input type="email" class="form-control" name="email" placeholder="Email">
	</div>
	<div class="description">
		<textarea name="description" style="width:25%;overflow:auto;" placeholder="Description"></textarea>
	</div>
	
	<button type="button" class="btn btn-success">Submit</button>
	
</div>

Comments