FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Modify textarea styles
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Modify textarea styles [message #20156] Wed, 29 September 2004 18:12 Go to next message
FitnessJunkie   United States
Messages: 13
Registered: September 2004
Karma: 0
Junior Member
Hello.

What template(s) do I need to change to make the textarea of all
the forms (reply, new topic, private message, e-mail) do a hard
wrap at the end of a line? It's difficult to figure out when there
are literally hundreds of templates available to help us customize
our forums.

I tried inserting

textarea {
wrap: hard;
}

into the forum.css.tmpl, but that didn't do anything. I don't
even know that that's a valid command(?) to put in a style sheet.

Please help?


Namaste,
FitnessJunkie
Re: Modify textarea styles [message #20175 is a reply to message #20156] Thu, 30 September 2004 14:27 Go to previous messageGo to next message
Abraxa is currently offline  Abraxa   Germany
Messages: 72
Registered: August 2004
Location: Germany
Karma: 0
Member
To change the ways the browers wrap in textareas there is a property called wrap, that's right, but you can't use it with CSS since you need to specify it in the textarea tag itself. So in the following files, locate the textarea tag and either change wrap="xxx" to wrap="physical" or add the key/value pair to the tag when necessary:

email.tmpl
mmod.tmpl
mvthread.tmpl
post.tmpl
ppost.tmpl
register.tmpl
remail.tmpl
report.tmpl
thr_exch.tmpl
usrinfo.tmpl

Note 1: Possible values for the wrap attribute are "off", which disallows word wrapping, "physical", which allows word wrapping and send the text with line breaks in tact when transmitting the data using scripting, and "virtual", which show word wraps in the box but sends the data as one long string of text when transmitting the data with scripts.
There also are "hard" and "soft" but as far as I know only Netscape interpretates these.

Note 2: http://www.askbjoernhansen.com/archives/2002/03/17/000003.html might be an interesting read if you have Mozilla-using visitors.

-Abby

[Updated on: Thu, 30 September 2004 14:27]

Report message to a moderator

Re: Modify textarea styles [message #20177 is a reply to message #20175] Thu, 30 September 2004 19:04 Go to previous messageGo to next message
FitnessJunkie   United States
Messages: 13
Registered: September 2004
Karma: 0
Junior Member
Thanks again for your detailed and extremely useful answer!

However, I think I'm still in much the same situation I started in.
I can't figure out just WHERE this elusive textarea tag even is.

For instance, I was piddling around on the post.tmpl page for quite
a while trying to find it before I made my original post here. But
nearly all the links there lead to funky commands in brackets, like
{MSG: submit_reply} -- not the actual form where I can modify the
textarea style.

:-/


Namaste,
FitnessJunkie
Re: Modify textarea styles [message #20179 is a reply to message #20156] Thu, 30 September 2004 20:50 Go to previous messageGo to next message
Abraxa is currently offline  Abraxa   Germany
Messages: 72
Registered: August 2004
Location: Germany
Karma: 0
Member
In post.tmpl you can find that tag on line 152:
<tr class="RowStyleA"><td class="vt nw GenText">{MSG: post_body}<br /><br />{TEMPLATE-DATA: post_options}</td><td>{VAR: message_err}<textarea rows="20" cols="65" tabindex="3" wrap="virtual" id="txtb" name="msg_body" onKeyUp="storeCaret(this);" onClick="storeCaret(this);" onSelect="storeCaret(this);">{VAR: msg_body}</textarea></td></tr>


When you go through the other files, just do a search for the word textarea and you will find the other tags Smile

-Soeren
Re: Modify textarea styles [message #20188 is a reply to message #20179] Thu, 30 September 2004 22:47 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Your original idea of adding:
textarea {
wrap: hard;
}

to forum.css.tmpl was valid, but you needed to rebuild the theme before the changes would take place. Anytime you change templates by hand (not via the web editor in admin control panel) you need to rebuild the theme to push the changes live.

(This is assuming the CSS you've specified is valid Wink )


FUDforum Core Developer
Re: Modify textarea styles [message #20195 is a reply to message #20156] Fri, 01 October 2004 12:05 Go to previous messageGo to next message
Abraxa is currently offline  Abraxa   Germany
Messages: 72
Registered: August 2004
Location: Germany
Karma: 0
Member
Hmm, wrap is a valid CSS property? Okay then, learned something new yet again. =)

Sorry about the misinformation.

-Soeren
Re: Modify textarea styles [message #20197 is a reply to message #20195] Fri, 01 October 2004 13:57 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
wrap is a valid css 3 property according to W3C

However, the valid values only appear to be:
wrap | no-wrap | soft-wrap | emergency


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: FUD Error log question
Next Topic: Moving the forum
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 05:46:39 GMT 2024

Total time taken to generate the page: 0.02419 seconds