Changing font

How do you change the font in a text area box?
LVL 2
lmredAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
brunoConnect With a Mentor Commented:
you used "font face" in a style....NOPE....try this instead

<textarea style="font-family: verdana,sans-serif;" rows="3" id="txtDescrip" name="txtDescrip">xxxy</textarea>



BRUNO
0
 
knightEknightCommented:
<TEXTAREA style="font: 10 pt Arial;"></textarea>
0
 
lmredAuthor Commented:
I used this to try and change the font face to verdana, san serif but it didn't work. What am I doing wrong?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
lmredAuthor Commented:
I tried this and it also didn't work.

<textarea style="font face: verdana,sans-serif;" rows="3" id="txtDescrip" name="txtDescrip">xxxy</textarea>
0
 
webwomanCommented:
Didn't work on what browser? It won't work on Netscape, it doesn't take styles on any form elements.

You can surround the element with a p tag with a style, or a span tag, and that might do it. Or might not... Netscape is very strange about stylizing form elements.
0
 
knightEknightCommented:
right ...

<SPAN style="font: 10pt Verdana;">
<FONT face="Verdana"><TEXTAREA style="font: 10pt Verdana;">test</textarea>
</font>
</span>
0
 
knightEknightCommented:
variation on a theme ... either will work if the browser supports styles.
0
 
CJ_SCommented:
<style type="text/css">
.cl{font-family:Verdana;font-size:10px;}
</style>

...

<textarea class="cl">blahdiblah</textarea>
0
 
svd2002Commented:
You can specify style as

<Style>
.TextAreaBox
{
    FONT-FAMILY: Verdana;
    FONT-SIZE: x-small
}
</Style>

and then apply style to textarea:

<TEXTAREA class="TextAreaBox"></TEXTAREA>

This will work.
0
 
CJ_SCommented:
Nice copy and paste kinda thing svd2002 :-)
0
 
dorwardCommented:
> variation on a theme ...
> either will work if the browser supports styles.

Umm - NO

CSS has a property called "font-family", it does not have one called "font face"
0
 
brunoCommented:
svd2002,

i hope you really didn't see CJ's comment, cause if so, what you posted is pretty disrespectful.


knighteknight,

what did you mean by "variation on a theme?"
0
 
knightEknightCommented:
yes, but that tag is not a CSS tag, it is a <FONT> tag, which has a face property ...

I was trying to be redundant to cover all the browsers, so I used a <FONT> tag which is supported by older browsers, and then I used two CSS styles -- one in the <SPAN> and the other in the <TEXTAREA>
0
 
lmredAuthor Commented:
I'm sorry I took so long. I was having trouble getting into this website yesterday. Thanks for everybody's help.

Lisa
0
 
brunoCommented:
knight,

ah ok....referring to your own comment.  :-)

lmred,

glad we could help.  Thanks for the A.  :-)




ww,

if you are getting these notifs, please check my printer thread over that other place...PC said your notifs are bouncing back to him.
0
All Courses

From novice to tech pro — start learning today.