Home » Html » Is it possible to change width of tab symbol in textarea?

Is it possible to change width of tab symbol in textarea?

Posted by: admin November 30, 2017 Leave a comment

Questions:

By default tab symbol in textarea equals to the width of 8 spaces. Is it possible to change this value to 4 for example?

I am mostly interested in using this in Chrome browser.

Answers:

You can use the following css for Firefox 4.0+, Chrome 21+ and Opera 10.6+

textarea,
pre {
    -moz-tab-size : 4;
      -o-tab-size : 4;
         tab-size : 4;
}