Aalok Amalmani
Aalok Amalmani

Reputation: 57

Cannot get items in the same line

I'm using bootstrap v.3 and I'm trying to get the item in the same line using form-horizontal class, however I'm not able to get this work, see the code below:

<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>

    <div class="grid one-half">
	    <div class="form-horizontal">
            <div class="form-group">
                <img id="footer-logo" src="#" alt="">
			    <div id="copyright">
					<p>All Rights Reserved.</p>
				</div><!--/#copyright-->
                <div id="credit">
                   <p>Powered by <a href="http://wordpress.org" rel="nofollow">WordPress</a>.</p>
                </div><!--/#credit-->
		    </div>
        </div>
     </div>

what am I doing wrong? Thanks.

Upvotes: 1

Views: 45

Answers (3)

Dhaval Jardosh
Dhaval Jardosh

Reputation: 7299

Is this what you are looking for?

<form class="form-inline">

  <div class="form-group">
      <img id="footer-logo" src="http://innovativeprofessionaloffices.com/wp-content/uploads/2014/07/seo-for-small-business.jpg" alt="">
   </div>

  <div class="form-group">
     <div id="copyright">
                    <p>All Rights Reserved.</p>
     </div><!--/#copyright-->
  </div>

  <div class="form-group">
     <div id="credit">
        <p>Powered by <a href="http://wordpress.org" rel="nofollow">WordPress</a>.</p>
  </div><!--/#credit-->
 </div>
</form>

Ref:Forms Bootstrap

Upvotes: 0

cutlerr
cutlerr

Reputation: 31

.form-group{
  display: inline-flex;
}

Upvotes: 1

Mariano L
Mariano L

Reputation: 1879

Use style="display:inline-block;"

<div class="grid one-half">
    <div class="form-horizontal">
        <div class="form-group" >
            <img id="footer-logo" src="#" alt="" style="display:inline-block;">
            <div id="copyright"  style="display:inline-block;">
                <p>All Rights Reserved.</p>
            </div><!--/#copyright-->
            <div id="credit"  style="display:inline-block;">
               <p>Powered by <a href="http://wordpress.org" rel="nofollow">WordPress</a>.</p>
            </div><!--/#credit-->
        </div>
    </div>
 </div>

Upvotes: 0

Related Questions