9

Okay, I'm not very familiar with HTML, or how it comes together with CSS. I have been looking all over on how to make two HTML buttons go side by side. Here is the code I'm currently using.

<FORM METHOD="LINK" ACTION="LINK TO WEBSITE" target="_blank">
  <input type="submit" value="Forum Home Page">
</FORM>
<FORM METHOD="LINK" ACTION="LINK TO A DIFFERENT WEBSITE" target="_blank">
  <input type="submit" value="Skill Guides">
</FORM>

No matter if I put them right after each other or put an alignment infront of them. I can't seem to get them to go next to each other. I hope there is someone that can easily and in a detailed way, help me out.

Gavin
  • 91
  • 1
  • 1
  • 2

3 Answers3

17

If I understand you correctly, you can just attach the following CSS:

form {
    display: inline;
}

As shown here: http://jsfiddle.net/zcz3j/

Randall Ma
  • 10,486
  • 9
  • 37
  • 45
0

Demo http://jsfiddle.net/satinder_singh1/wr4Xv/1/

<div id="main">
<div class="floatdiv"><FORM METHOD="LINK" ACTION="LINK TO WEBSITE" target="_blank">
  <input type="submit" value="Forum Home Page">
</FORM></div>
<div class="floatdiv">
<FORM METHOD="LINK" ACTION="LINK TO A DIFFERENT WEBSITE" target="_blank">
  <input type="submit" value="Skill Guides">
    </FORM></div></div>​

<style type="text/css">
    #main
    {
    position:relative;
        width:200px;
    }

    .floatdiv
    {
    float:left;
        width=80px
    }
</style>

Satinder singh
  • 10,100
  • 16
  • 60
  • 102
  • As i said, I still haven't quite understood how both HTML an CSS are set together. Please consider. – Gavin Jul 14 '12 at 06:51
0

You could also try wrapping them in a table tag. That's how I fixed my similar issue. The table automatically set them side by side.

Stevo
  • 85
  • 3
  • 11