Tim O'Connell
Tim O'Connell

Reputation: 3

BootStrap 3.0 grid system not containing text?

I am just learning the new bootstrap grid system however it is very different from 2.x and I can't seem to get it to contain anything, it just flows on out.

Screenshot: https://i.sstatic.net/aJMMU.png

enter image description here

Code: http://pastie.org/8272634

 <!DOCTYPE html>
 <html>
<head>
    <title>ICG - Home</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/over.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="assets/js/html5shiv.js"></script>
      <script src="assets/js/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <div class="navbar navbar-default navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" id="blue" href="#">iCanGame</a>
        </div>
        <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#about">Community</a></li>
            <li><a href="#contact">All Games</a></li>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <li><a href="#login">Login</a></li>
            <li><a href="#register">Register</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </div>
    <div id="navend"></div>
    <div class="container">
              <div class="row">
                <div class="col-xs-10">left</div>
                <div class="col-xs-2"><div class="wrap">sdsafdsafdsafdsafdsafdsajlsdhakfhdksahlfdsahkfldsakfhkdsakfdkjslahfdskhaflhdksaklfhdsaklfdkhsa</div></div>
              </div>
    </div>
    <script src="assets/js/jquery.js"></script>
    <script src="dist/js/bootstrap.min.js"></script>
</body>
</html>

Upvotes: 0

Views: 1375

Answers (3)

Choco Li
Choco Li

Reputation: 511

Because you are giving a no-space-contain word.

Ex: string like adfjklsdjfaksdjfsakldjfsakl;fjsakl;djf won't work.

instead, string like asdfkljsd;lf asdfkjds asdkfjklj will work

And the grid system will not cut single word into two line.

By the way, give testing paragraph by typing will not be a great idea.

Try Something like paragraph generator to generate random paragraph.

Upvotes: 0

gespinha
gespinha

Reputation: 8487

You are using two .col-md-12, shouldn't you be using only two .col-md-6 classes, since the .col-md-12 are width:100% divs?

Upvotes: 0

Prasanna Aarthi
Prasanna Aarthi

Reputation: 3453

Well the text has been overflowing because your sample text is a single word you have not included any space between those... Please find code below..

<div class="row">
                <div class="col-xs-10"><p>left</p></div>
                <div class="col-xs-2"><div class="wrap"><p>
sdsafds dhakfhdks ahlfdsahkf ldsakfhk   dsakfdkj slahfd skhafl   hdksaklfhds aklfdkhsa</p>   </div></div>


</div>

Upvotes: 1

Related Questions