I am trying to make two button hyperlinks go side by side. I saw this question , but can't get the answers to work. Below are my two attempts to make the buttons go side by side. The first attempt works, but the hyperlinks to the wrong location. The second hyperlink is correct, but not side by side. The third one based on this question is not linked anywhere, but I think that this is due to the use of links instead of Javascript:submitRequests() .
<!DOCTYPE html> <html> <body> <head> <style> .container { overflow: hidden; } button { float: left; } button:first-child { margin-right: 5px; } </style> </head> <form action="http://trinker.imtqy.com/qdap_dev/paste2.html" target="_blank"> <input type="submit" value="paste2"> </form> <form action="http://trinker.imtqy.com/qdap_dev/colSplit.html" target="_blank"> <input type="submit" value="colSplit"> </form> Attempt 1 <form action="http://trinker.imtqy.com/qdap_dev/paste2.html" target="_blank"> <input type="submit" value="paste2"> <form action="http://trinker.imtqy.com/qdap_dev/colSplit.html" target="_blank"> <input type="submit" value="colSplit"> </form> </form> Attempt 2 <form action="http://trinker.imtqy.com/qdap_dev/paste2.html" target="_blank"> <input type="submit" value="paste2"> </form><form action="http://trinker.imtqy.com/qdap_dev/colSplit.html" target="_blank"> <input type="submit" value="colSplit"> </form> Attempt 3 <div class="container"> <button onclick="http://trinker.imtqy.com/qdap_dev/paste2.html">paste2</button> <button onclick="http://trinker.imtqy.com/qdap_dev/colSplit.html">colSplit</button> text </div> </body> </html>
source share