Prevent <form> line break between two <form> tags

I think this is the correct solution:

form { display: inline-block; }

The inline-block value is used for the purpose of laying out native block-level elements inline. Those elements will still remain blocks.

Changing the model for an element from block to inline is a radical move because it may mess things up depending on what the contents of the element are.

For this particular issue, using inline-block is the way to go.


Or:

form {
    float: left;
    margin-right: 5px;
}

This is an old thread, so I probably am not helping anyone, but here is my suggestion. Many programmers avoid tables and therefore do not like my method, but I solve this problem as follows:

<table><tr><td><form></form></td><td><form></form></td></tr></table>

form {
    display: inline;
}

Tags:

Html

Css