I'm currently investigating the use of Twitter bootstrap as a foundation for my future web development projects for clients. I have been through all of the standard documentation on their Github page and from my understanding, to use the grid layout effectively, your rows must only contain a total of twelve columns (made up of different elements or a single element).
With this in mind I have conducted a small test with some text spanning 4 columns in a row along with an offset div spanning 6 columns. This seems to work fine however, I have then tried to include a single row contained a div spanning 3 columns that is offset by 9 columns (still totalling 12) to give the impression that the content within the div is floated right on the page. The issue is that this appears fine when the window mode is suited to a desktop however as I begin to scale the window, the contents of the div are pushed out of the overall container. If I continue to scale down the window, the elements stack as I expect for the mobile view.
My question is, why is this behaving in this way? My understanding was that as long as there were 12 columns the content would remain encased within their external container.
My code can be found below. There is lots of inline css but this is just for testing purposes. This is stock bootstrap with all options checked at the customisation stage meaning that all of the responsive options are included.
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<meta name="viewport" content="width-device-width, initial-scale=1.0">
<!--BOOTSTRAP-->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="container-fluid" style="border: 1px solid #cccccc">
<div class="row-fluid">
<div class="span4">This is a div spanning 4 columns</div>
<div class="span6 offset2">This is a div spanning 6 columns. It should appear alongside the column spanning 4 columns.</div>
</div>
<div class="row-fluid">
<div class="span3 offset9">
<form class="form-search">
<div class="row-fluid">
<div class="input-append span2">
<input type="text" class="input-medium search-query">
<button type="submit" class="btn btn-info"><i class="icon-search icon-white"></i> Search </button>
</div>
</div>
</form>
</div>
</div>
</div>
</body>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</html>
This occurs whether I use the fluid layout or not. In the fluid example the searchbox will appear as if it's going off the screen. In the fixed example it will overlay the grey border of the container.