Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 866
serg Avatar asked Jul 31 '10 17:07

serg


People also ask

How wide is a tab character?

The default value for the tab-size property is 8 space characters, and it can accept any positive integer value. He are some examples of the various ways tab-size can be used: HTML.

How do I fix the width of my textarea?

To prevent a text field from being resized, you can use the CSS resize property with its "none" value. After it you can use the height and width properties to define a fixed height and width for your <textarea> element.


1 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; } 
like image 177
Mike Avatar answered Sep 19 '22 03:09

Mike