PaolaJ.
PaolaJ.

Reputation: 11532

Is possible to submit button be at aright side of input, not below?

Is possible to submit button be at aright side of input, not below ? In code I copied form

<form action="/city" method="post">
    <fieldset data-role="fieldcontain">
        <input type="text" name="city_name" id="city_name" placeholder="City Name">
    </fieldset>
    <input type="submit" value="Create New City">
</form>

but button Create New City is always below.

Upvotes: 0

Views: 886

Answers (4)

Nandu
Nandu

Reputation: 3126

add the following css

fieldset
    {
        display: inline;
    }

http://jsfiddle.net/tYsTd/

Upvotes: 1

Rory McCrossan
Rory McCrossan

Reputation: 337560

If you can't amend the HTML, try adding this CSS to your page:

fieldset {
    display: inline-block;
}

Example fiddle

Upvotes: 4

Dineshkani
Dineshkani

Reputation: 3005

Use like this

<form action="/city" method="post">
<fieldset data-role="fieldcontain" style='display: inline'>
    <input type="text" name="city_name" id="city_name" placeholder="City Name">
</fieldset>
<input style='display: inline' type="submit" value="Create New City">
</form>

See Demo

Upvotes: 1

Captain Kenpachi
Captain Kenpachi

Reputation: 7215

<form action="/city" method="post">
    <fieldset data-role="fieldcontain">
        <input type="text" name="city_name" id="city_name" placeholder="City Name">
        <input type="submit" value="Create New City">
    </fieldset>
</form>

Upvotes: 1

Related Questions