PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, May 17, 2022

[FIXED] How do I get forms inline with each other?

 May 17, 2022     css, html, php     No comments   

Issue

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

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>



Answered By - Barmar
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing