Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Html – How to display different forms in a single line?

I am using 3 different forms for my flask application. I want to display these forms in a single line instead of one below the other. Is there anyway to do it? Here’s my html snippet (no css used yet)

<form action="/pull_entity_by_manufacturer" method="post">
    pull an entity by a given man <input type="text" name="ev_manu"><input
        type="submit"/>
</form>

<form action="/pull_entity_by_year" method="post">
    pull an entity by a given yr <input type="number" name="ev_yr"><input type="submit"/>
</form>

<form action="/pull_entity_by_range" method="post">
    <label for="cars">Range upto:</label>
    <select name="ev_rg" id="cars">
        <option value="600">600</option>
        <option value="500">500</option>
        <option value="400">400</option>
        <option value="300">300</option>
        <option value="200">200</option>
    </select>
    <input type="submit"/>
</form>

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Form tag is a "Block level" element like Div tag for example.

you can add CSS to change it

<style> form{display:inline-block} </style>

Or by using flex

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading