Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Textarea and fonts

    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

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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.
    Teed

  • #3
    Regular Coder hdewantara's Avatar
    Join Date
    Aug 2009
    Location
    Jakarta, Indonesia.
    Posts
    366
    Thanks
    9
    Thanked 53 Times in 52 Posts
    A guess then...
    Perhaps this only happen in firefox which wraps long lines to the next.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •