SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Jun 14, 2005, 11:53 #1
- Join Date
- Oct 2004
- Location
- ri
- Posts
- 82
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
help with textarea line-height and resizing textarea
hi-
does the textarea field accept a line-height style? i'm trying to get the text i enter in the textarea to match how my actual output will be (i'm using a line-height: 150%; ) but when i add this style to the textarea it doesn't seem to work for me.
HTML Code:<textarea name="details" id="details" rows="7" cols="100" style="line-height:150%"> <?php echo $details; ?> </textarea>
also is there anyway to have my textarea autogrow when the text entered causes it to scroll down? i would like the textarea to be intially somewhat small and grow (if needed) to show all the text at once. i think this can be done in javascript but would appreciate any links if someone knows a good script to do this.
thanks for any help!
-
Jun 14, 2005, 13:09 #2
- Join Date
- Dec 2004
- Location
- Sweden
- Posts
- 2,670
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Code:html { font:150%/2 sans-serif; background:yellow; color:navy; } textarea { font:100%/2 sans-serif; /* IE doesn't support "inherit" */ height:10em; width:20em; background:transparent; color:navy; /* IE doesn't support "inherit" */ }
Simon Pieters
Bookmarks