how to align forms via bootstrap

I have contact us page, where i have contact form, but i want align to center. I tried use in more divs and elements add text center, but nothing works. Can you help me? Thanks enter image description here

<div class="container">
<div class="row">
    <div class="col-md-12">
        <div class="well well-sm">
            <form class="form-horizontal" method="post">
                <fieldset>
                    <legend class="text-center header">Contact us</legend>

                    <div class="form-group">
                        <span class="col-md-1 col-md-offset-2 text-center"><i class="fa fa-user bigicon"></i></span>
                        <div class="col-md-8">
                            <input id="fname" name="name" type="text" placeholder="First Name" class="form-control">
                        </div>
                    </div>                        


                    <div class="form-group">
                        <span class="col-md-1 col-md-offset-2 text-center"><i class="fa fa-envelope-o bigicon"></i></span>
                        <div class="col-md-8">
                            <input id="email" name="email" type="text" placeholder="Email Address" class="form-control">
                        </div>
                    </div>

                    <div class="form-group">
                        <span class="col-md-1 col-md-offset-2 text-center"><i class="fa fa-pencil-square-o bigicon"></i></span>
                        <div class="col-md-8">
                            <textarea class="form-control" id="message" name="message" placeholder="Enter your massage for us here. We will get back to you within 2 business days." rows="7"></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-md-12 text-center">
                            <button type="submit" class="btn btn-primary btn-lg">Submit</button>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
</div>

Upvotes: 0

Views: 28

Answers (1)

Alamin
Alamin

Reputation: 2165

You can try this way, hope it will works

<div class="container">
    <div class="row"> 
    
  <div class="col-md-10 offset-md-1">
      ......
  </div>
</div>


</div>

Upvotes: 1

Related Questions