...

View Full Version : Textarea and fonts



lah1308
04-28-2011, 06:26 PM
I have a text area which is created in javascript and appended to a table cell. The table cell, rows and table body are all also created in javascript and appended to a div on my page.

My style for the textarea is as follows:
textarea
{
font-family: Tahoma, Verdana, Calibri, Arial, Sans-Serif;
border: 1px solid #444;
width: 95%;
height: 180px;
cursor: default;
padding: 3px;
}

For some reason when I have a lot of text in the text area and the font-family is as above and Tahoma is applied, it resizes the textarea and table width so that is scrolls out of my wrapping div. If I remove the font-family stuff, or even just apply a font of Arial, its fine....??

I have tried putting the textarea in a div before putting it into the cell but that doesn't work, has anyone come across this before or have any ideas?

Thanks

teedoff
04-28-2011, 07:20 PM
Not sure but maybe different fonts are different sizes, and a larger font stretches "out" of the div since you give it a specified height?

Could probably tell for sure if you gave a link to your test site.

hdewantara
04-30-2011, 12:35 AM
A guess then...
Perhaps this only happen in firefox which wraps long lines to the next.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum