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

How do I get forms inline with each other?

This probably seems like a really dumb question, but i am building a website for my school project and i need to get these two forms next to each other rather then having a line break inbetween them:

<div style="display:inline;float:left;?">

  <br>

  <form action="edexcel_maths.php" method="post">
    <input style="display:inline;" type="submit" name="edmathsbutt" class="button" value="Edexcel Maths">
  </form>

  <form action="aqa_physics.php" method="post">
    <input style="display:inline;" type="submit" name="aqaphybutt" class="button" value="AQA Physics">
  </form>

</div>

>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

Use display: inline style on the forms.

form {
  display: inline;
}
<div style="display:inline;float:left;?">

  <br>

  <form action="edexcel_maths.php" method="post">
    <input style="display:inline;" type="submit" name="edmathsbutt" class="button" value="Edexcel Maths">
  </form>

  <form action="aqa_physics.php" method="post">
    <input style="display:inline;" type="submit" name="aqaphybutt" class="button" value="AQA Physics">
  </form>

</div>
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