3

I want to allow users to use TAB in my textarea to indent the text. The problem is the size of it. The indentation is too big (like 8) and I want to rezise it (to 4).

the way it is:

some text
        some text

the way I want it to be:

some text
    some text

I had no problem doing that for showing the text afterwards. However I couldn't do it at the editing time, in the textarea. thanks (:

Hugo Mota
  • 11,200
  • 9
  • 42
  • 60
  • 5
    You can do this with an experimental CSS3 property called `tab-size`. See this question: [tab width css property](http://stackoverflow.com/questions/6754733/tab-width-css-property) – BoltClock Jul 22 '11 at 16:31

1 Answers1

3

As BoltClock said, the CSS3 draft property tab-size should work. Firefox and Opera support the property with

-moz-tab-size: 4;
-o-tab-size: 4;

There's one guide here

Rdpi
  • 609
  • 1
  • 5
  • 13
  • with the example in that guide link you won't be able to correctly copy the code. it's better if you set the width property of the tab span to the new size. still, doesn't solve my textarea problem. i guess i'll have to wait until the browsers catch up with CSS3 :p – Hugo Mota Jul 22 '11 at 17:22
  • i know. it was just an adding :p - thank you. and BoltClock too (: – Hugo Mota Jul 22 '11 at 17:29