Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Font for textarea

Status
Not open for further replies.

jslmvl

Vendor
Jan 26, 2008
268
GB
I got my HTML file:
<textarea id="text1" style="font-Family:Courier New" rows="6" cols="80"></textarea>
<textarea id="text2" style="font-Family:Times New Roman" rows="6" cols="80"></textarea>
<textarea id="text3" rows="6" cols="80"></textarea>

And my IE Option Font:
Webpage font: Times New Roman
Plain text font: Courier New

I have found the font in text3 looks is not the same as that in text1, not the same as that in text2. How to set the font for text1 and text2 as the same as that in text3?

Thank you in advance.
 
The obvious thing would be to remove the font specifications from your other textareas. But I'm guessing that's not what you mean.

Can you maybe explain a bit more?

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Also note, that when you have multiple words in a font name, CSS expects quotes around the name of the font. This may or may not have something to do with your font issue.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
you could set a general tag for textareas in your CSS document or html document header:

textarea{
font-family:"Times new roman";
}

this would give all textareas the same font, it is generally good practice to do this anyway as different browsers often have different standard fonts causing the site to look different in different browsers.

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Thanks a lot for all your helps!
I found my problem is in the font setting of my IE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top