l-emi l-emi - 6 months ago 17
CSS Question

Aligning buttons next to a contact form

So I'm trying to align three buttons next to a contact form. I put both in a row class, and placed the form and buttons in their own col-lg-6. However, the buttons don't align right next to the contact form. They fall underneath it no matter what I do.

I tried adding

float: right;


and it works by aligning them to the right, but still underneath the form. I'd appreciate any help, thanks!

Here's the link to the page, contact form + buttons at the bottom.

Answer

add them under same row:

  <div class="container-fluid">
<div class="row">
<div class="col-lg-6">
  <div class="container shapef">
    <form class="well form-horizontal" action=" " method="post" id="contact_form">
      <fieldset>

        <br>

        <div class="form-group">
          <label class="col-md-2 control-label">Name</label>
          <div class="col-md-9 inputGroupContainer">
            <div class="input-group">
              <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
              <input name="name" placeholder="Name" class="form-control" type="text">
            </div>
          </div>
        </div>

        <div class="form-group">
          <label class="col-md-2 control-label">Email</label>
          <div class="col-md-9 inputGroupContainer">
            <div class="input-group">
              <span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
              <input name="email" placeholder="Email Address" class="form-control" type="text">
            </div>
          </div>
        </div>


        <div class="form-group">
          <label class="col-md-2 control-label">Message</label>
          <div class="col-md-9 inputGroupContainer">
            <div class="input-group">
              <span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
              <textarea class="form-control" name="comment" placeholder="Message"></textarea>
            </div>
          </div>
        </div>

        <div class="alert alert-success" role="alert" id="success_message">Success <i class="glyphicon glyphicon-thumbs-up"></i> Thanks for contacting me, I'll get back to you shortly.</div>

        <!-- Button -->
        <div class="form-group">
          <label class="col-md-2 control-label"></label>
          <div class="col-md-4">
            <button type="submit" class="btn btn-warning">Send <span class="glyphicon glyphicon-send"></span></button>
          </div>
        </div>

      </fieldset>
    </form>
  </div>
</div>
<div class="col-lg-6 kopcheta">
                <ul class="list-inline banner-social-buttons">

                        <li>
                            <a href="https://github.com/l-emi" target="_blank" class="btn btn-default btn-lg btn-warning"><i class="fa fa-github fa-fw"></i> <span class="network-name">Github</span></a>
                        </li>
                        <li>
                            <a href="https://uk.linkedin.com/in/lidiya-nikolova-b979348b" target="_blank" class="btn btn-default btn-lg btn-warning"><i class="fa fa-linkedin fa-fw"></i> <span class="network-name">Linkedin</span></a>
                        </li>
                        <li>
                            <a href="https://www.freecodecamp.com/l-emi" target="_blank" class="btn btn-default btn-lg btn-warning"><i class="fa fa-fire fa-fw"></i> <span class="network-name">FreeCodeCamp</span></a>
                        </li>

                </ul>
            </div>
<!-- /.container -->
</div>
</div>
</div>
Comments