Home > front end >  How do I get forms inline with each other?
How do I get forms inline with each other?

Time:05-12

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"  value="Edexcel Maths">
  </form>

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

</div>

CodePudding user response:

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"  value="Edexcel Maths">
  </form>

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

</div>

  • Related