I have been searching around for this, but haven't found a solution yet. Maybe anyone here has an idea on how to do the following: I have a textarea, and next to it is a submit button. I would like the submit button to be the same height as the textarea. And to make things even more difficult, a user can define how many rows the textarea is, and what the font size is. So basically, the button should be smaller or larger depending on what the user chooses the textarea size to be.
Let's presume the textarea height is 200 pixels.. the submit button is then 200pixels too? Where is the sense?
Well, the user defines the nr of rows that the textarea should be. If i knew how much px one row is, then i could size the button accordingly. But that information i can't find either. It probably also depends on the size of the font in px. I tried calculating the amount of rows times the size of the font, and then copy that value to the button, but that does not seem to work.
But why you need a submit button that is the same height then the textarea? That's what I do not get I know that you can calculate height/width of an item with jquery.
Styling of your submit button is nothing what jQuery has to do. Pure CSS. But calculating width/height can be done with jQuery or JS. E.g. http://groups.google.com/group/jquery-en/browse_thread/thread/606fc26b3018bcb3 width() and height() ...