-1

In HTML, I want to align a button besides a text-area like in a messenger:

Like this

Both are in the footer, but when I change the screen size, this happens:

This happens

<input type="button" value="➢" onclick="CheckAndSubmit ()" style=" position:fixed; bottom:4px;right:100px; padding:15px;">
<textarea name="message" id="message" cols="40" rows="1" style="position:fixed; padding:15px; bottom:4px;"></textarea>
Racil Hilan
  • 24,690
  • 13
  • 50
  • 55

1 Answers1

0

The easiest way to do it is to use Bootstrap, you can read more about it here; http://getbootstrap.com/.

To use bootstrap, put this in your html -tag:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

In your HTML code, you can then simply write:

<div class="container">
    <div class="col-md-10">
        // Input field goes here
    </div>
    <div class="col-md-2>
        // Button goes here
    </div>
</div>
Robin
  • 76
  • 1
  • 6