Ask Question

Menu

How to create a responsive textarea in HTML and CSS

responsive-textarea.html

<!Doctype html>
<html>
<head>
<title>Responsive Textarea</title>
<style>
.container {
max-width: 820px;
margin: 0px auto;
margin-top: 50px;
}
.comment {
float: left;
width: 100%;
height: auto;
}
.commenter {
float: left;
}
.commenter img {
width: 35px;
height: 35px;
}
.comment-text-area {
float: left;
width:100%;
height: auto;
}
.textinput {
float:left;
width: 100%;
min-height: 75px;
outline: none;
resize: none;
border: 1px solid grey;
}
</style>
</head>
<body>
<div class="container">
<div class="comment">
<div class="commenter">
</div>
<div class="comment">
<textarea class="textinput" placeholder="Comment"></textarea>
</div>
</div>
</div>
</body>
</html>

Output

Responsive Textarea






Subscribe with us to get latest topic update






Choose a Language



Subscribe