Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > tab size in a TEXTAREA

Reply
Thread Tools

tab size in a TEXTAREA

 
 
Rob
Guest
Posts: n/a
 
      05-06-2005
Hello all,

Is it possible to change the tabsize in a textarea element?

thnks in advance

Rob


 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-07-2005
"Rob" <> wrote:

> Is it possible to change the tabsize in a textarea element?


The question is quite ambiguous and vague, but the correct answer is
"No, and you should reconsider what you are really doing, since you
asked." The odds are that you are trying to use an input field to
present some legalese to lusers in a stamp-size scrollable window.
(Maybe not, but the lack of information points that direction.)

P.S. The principle that replies should primarily be posted to the group
is no excuse for using a forged From field.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
 
extol extol is offline
Junior Member
Join Date: Jun 2008
Posts: 1
 
      06-12-2008
I second the gentleman's question, and I didn't find it ambiguous or poorly worded at all.

When you display a tab character in a textarea, like they do at http://sortmylist.com for example, it's always 8 characters.

I'm working on a web app where I display text that includes tabs in a textarea, and would like them to be 12 characters.

Does anybody know of a way to do this?
 
Reply With Quote
 
Jacobian Jacobian is offline
Junior Member
Join Date: Jan 2011
Posts: 1
 
      01-29-2011
You can change the tab size using CSS:
developer.mozilla.org/en/CSS/-moz-tab-size

For example, add this style declaration to the style sheet of your webpage:
textarea, pre { -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; }

This will set the tab size for all textarea and pre elements on your web page. This is supported in Firefox 4.0+ and Opera 10.6+.

On the other hand, if you would like to set a custom tab size for yourself (on *all* web pages) in Firefox 4+, then you should create a user style declaration to set your personal tab size.

Here is some information from Mozilla, although I haven't tried this myself:
mozilla.org/unix/customizing.html#usercss

Your custom style rule might look something like this:
textarea, pre { -moz-tab-size:4 !important; tab-size:4 !important; }
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add </textarea> within <textarea> tags? frank.moens@gmail.com Javascript 1 07-04-2007 04:00 PM
Textarea Inside of a textarea wperry1@gmail.com ASP General 6 02-05-2006 08:00 AM
tab escape not shown in textarea soup_or_power@yahoo.com Javascript 3 08-13-2005 05:01 PM
Controlling the function of the tab key on in a TEXTAREA field J. VerSchave Javascript 4 09-23-2004 10:49 PM
Removing carriage returns from <textarea></textarea> input Augustus ASP General 1 09-10-2003 04:55 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57