Search code examples
htmlcssmaterialize

Change row count doesn't work in materialize css text area


In materialize css text area, is it possible to initialize the text area with a specific row count using "rows='20'" ? How can we increase the default row count ?

code which doesn't work:

<div class="input-field col s12">
   <textarea id="textarea1" class="materialize-textarea" rows="20" ></textarea>
   <label for="textarea1">Text</label>
</div>

Solution

  • The default stylesheet is setting a height so you'll have to override that.

    textarea.materialize-textarea{height: 6rem;}