View Full Version : <textarea> bolder text ?
Cris79
02-24-2003, 07:46 AM
Do you know how can I write in this form text with different color, size, font?
<form>
<textarea name="textbox" rows=3 cols=30>
text1, text 2 ...
</textarea>
</form>
I need to have a script something like in a forum?
Thanks !!!
Mhtml
02-24-2003, 09:18 AM
It is done using CSS.
There are many ways of incorporating CSS into your pages.
Firstly I suggest going to http://www.w3schools.com/css and learning a little about CSS.
Secondly add this to your page in the <head></head> section.
<style>
textarea {
font-family:arial;
font-weight:bold;
font-size:12pt;
color:#2266AC;
}
</style>
Cris79
02-24-2003, 10:30 AM
Thanks for the answer. I need to make for example only Text 2 bolder. I am new in JavaScript so thanks for the link!!!:thumbsup:
Mhtml
02-24-2003, 10:51 AM
I am unsure by what you mean, do you only want one particular textarea to be styled?
Cris79
02-24-2003, 02:13 PM
I want that only some of the text who is on <textarea > to be bolder or to have other style.
That's worse since TEXTAREA only can contain plain text. Afraid it'a all or nothing. :(
I need to have a script something like in a forum?
i assume Cris79 is talking about vB Code or a similar ability to create bold text on the output as opposed to text which displays as bold in the textarea itself.
can't say i know the most effective way of doing it though.
cg9com
02-24-2003, 05:59 PM
there is no way to actually have certain words formatted in a textarea without extensive javascripting, i have a bookmark to something like this at home, i can post it up later.
Mhtml, why not use a shorthand font attrib? put those 3 lines into 1.
Cris79
02-25-2003, 08:30 AM
Thanks !!! I will search more, it must be a way to do something like this.
Do you know Basic because a have question abaut Basic and HTML?
- Can I make an .exe in Basic that opens an .html? I have fine an api function called ShellExecute but it opens only .txt .
Mhtml
02-25-2003, 08:27 PM
Yeah you can. But I think a batch file woud be a lot easier.
There is a way to have multiple styles of text but it would be using layers and some heavy duty javascripting so I think it would be a bad idea.
cg9com
02-25-2003, 08:58 PM
this was posted somewhere in this forum before.
http://www.interactivetools.com/products/htmlarea/
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.