I need to auto adjust the height of text area. By default it will be in single line. while growing the text the height will also needs to be increased. please suggest me with the css. or tell me with simple jave script.
Code is:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
</head>
<style>
textarea {
resize: none;
overflow: auto;
min-height: 24px;
max-height: 100px;
}
#url{ word-break: break-all;
font-family: 'Lato', sans-serif;
cursor: text;
resize: none;
height: 24px;
font-size: 14px;
line-height: 22px;
background-color: transparent;
border: 0;
margin-top: 6px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
text-decoration: none;
width:500px}
</style>
<body>
<textarea readonly id="url">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</textarea>
<div>
Where does it come from?</div>
</body>
</html>