0

I am building user interface for responsive single page chat application using HTML and CSS. The interface must include a <form> element for submitting a message. Inside the <form> element I have <textarea> element and <button> element as submit button. The button must have inside it two images one centered on the other, and after a lot of effort and searchs I managed to do that. The problem is that I want this <button> and <textarea> to be on the same line and vertically centered in the <form>. I tried and searched a lot for something that may help me but none of the results was what I need,some of the what I tried is based on the answers in the following link:

Vertically centering button using css

see my code in fiddle.

Note: I am not allowed using CSS frameworks and no IDs for styling.

I appreciate any help. Thank you!

Community
  • 1
  • 1
user8244016
  • 929
  • 3
  • 12
  • 24

2 Answers2

0

use vertical-align:middle; on textarea

CSS

textarea{
vertical-align:middle;
}
Chandra Shekhar
  • 3,550
  • 2
  • 14
  • 22
-1

You can adjust your image by giving it width, height and required margin padding.

img {
    width: 30px;
    height: 30px;
    background-color: red;
}

For centering objects you can use margin: 0 auto;