HTML Form How to - Make textarea border shadowy








Question

We would like to know how to make textarea border shadowy.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
textarea#styled {<!-- ww w.j av  a2  s  .  c  om-->
  width: 600px;
  height: 120px;
  border: 3px solid #cccccc;
  padding: 5px;
  font-family: Tahoma, sans-serif;
  border-radius: 10px;
}
</style>
</head>
<body>
  <textarea name="styled-textarea" id="styled"
    onfocus="this.value=''; setbg('#e5fff3');" 
    onblur="setbg('white')">Enter your comment here...</textarea>
</body>
</html>

The code above is rendered as follows: