سؤال

I can't seem to get the scaffolding grid to work for my Bootstrap code. The two different div classes are appearing on different lines and are both the full width of the screen. Any help would be much appreciated

<body>
  <div class="container">
    <div class="row">
        <div class="span3">
            <p><a href="#">Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum! Lorem ipsum, Lorem ipsum!</a></p>
        </div>
        <div class="span3 offset2">
            <h4><a href="#">Same Line?</a></h1>
        </div>
    </div>
</div>

هل كانت مفيدة؟

المحلول

You are probably using the bootstrap 3 stylesheet with version 2.3 html.

use this stylesheet: http://getbootstrap.com/2.3.2/assets/css/bootstrap.css

vs

http://getbootstrap.com/dist/css/bootstrap.css

نصائح أخرى

That should be working correctly. Do you have any example online? (The only thing I can think of without more detail is that you do not have the correct bootstrap css file loading in the header)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top