Solved

Changing font

Posted on 2002-03-11
15
205 Views
Last Modified: 2013-12-02
How do you change the font in a text area box?
0
Comment
Question by:lmred
  • 4
  • 3
  • 3
  • +4
15 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 6855515
<TEXTAREA style="font: 10 pt Arial;"></textarea>
0
 
LVL 1

Author Comment

by:lmred
ID: 6855580
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
 
LVL 1

Author Comment

by:lmred
ID: 6855647
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
 
LVL 19

Expert Comment

by:webwoman
ID: 6855679
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
 
LVL 33

Expert Comment

by:knightEknight
ID: 6855722
right ...

<SPAN style="font: 10pt Verdana;">
<FONT face="Verdana"><TEXTAREA style="font: 10pt Verdana;">test</textarea>
</font>
</span>
0
 
LVL 18

Accepted Solution

by:
bruno earned 50 total points
ID: 6855743
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
 
LVL 33

Expert Comment

by:knightEknight
ID: 6855781
variation on a theme ... either will work if the browser supports styles.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 22

Expert Comment

by:CJ_S
ID: 6855927
<style type="text/css">
.cl{font-family:Verdana;font-size:10px;}
</style>

...

<textarea class="cl">blahdiblah</textarea>
0
 
LVL 2

Expert Comment

by:svd2002
ID: 6856030
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
 
LVL 22

Expert Comment

by:CJ_S
ID: 6856087
Nice copy and paste kinda thing svd2002 :-)
0
 
LVL 17

Expert Comment

by:dorward
ID: 6856256
> 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
 
LVL 18

Expert Comment

by:bruno
ID: 6856664
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
 
LVL 33

Expert Comment

by:knightEknight
ID: 6856688
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
 
LVL 1

Author Comment

by:lmred
ID: 6856718
I'm sorry I took so long. I was having trouble getting into this website yesterday. Thanks for everybody's help.

Lisa
0
 
LVL 18

Expert Comment

by:bruno
ID: 6856743
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now