14

How can I place an input type=submit on a new line following a text area element?

without using a br tag or a div, ideally I like to do it using css.

John
  • 1,059
  • 4
  • 12
  • 16

2 Answers2

20
<textarea></textarea><input type="submit" class="submitbutton">


.submitbutton{
  display:block;
}
Svante Svenson
  • 12,315
  • 4
  • 41
  • 45
10

You can display it as a block-level element with display:block. With CSS 2 you can use this rule:

input[type=submit] {
    display: block
}
Gumbo
  • 643,351
  • 109
  • 780
  • 844
  • 1
    is this not going to stretch the button, to the whole available width? – John Jan 10 '10 at 20:17
  • @John: No, not as far as I know. – Gumbo Jan 10 '10 at 20:28
  • Your solution works for text boxes and list boxes, but for some reason it does not work with maps. https://stackoverflow.com/questions/62354598/putting-submit-button-at-the-bottom-of-the-form – Ross Symonds Jun 14 '20 at 01:37