EN
HTML - Textarea add horizontal scroll
14 points
We can solve it by using textarea tag attribute:
xxxxxxxxxx
1
wrap="off"
Complete code example:
xxxxxxxxxx
1
2
<html lang="en">
3
<body>
4
5
<textarea wrap="off" style="width: 200px; height: 50px;">
6
Description random is static method that returns random float number from range
7
</textarea>
8
9
</body>
10
</html>
Expected result:
We can solve it by using style:
xxxxxxxxxx
1
white-space: nowrap;
Compete code example:
xxxxxxxxxx
1
2
<html lang="en">
3
<body>
4
5
<textarea style="white-space: nowrap; width: 200px; height: 50px;">
6
Description random is static method that returns random float number from range
7
</textarea>
8
9
</body>
10
</html>
Expected result: