skip to Main Content

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.

3

Answers


  1. 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>
    
    Login or Signup to reply.
  2. .form-group{
      display: inline-flex;
    }
    
    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search