CSS How to place a submit button on a new line?

2019-06-16 06:53发布

问题:

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.

回答1:

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


.submitbutton{
  display:block;
}


回答2:

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
}