AgostinoX
AgostinoX

Reputation: 7683

twitter bootstrap, container class is not nestable

The documentation of the bootstrap 3 container class states that 'due to padding and more, neither container is nestable".
But then, in the official examples, take this, a demo of a simple navbar, we see something like:

<body>
<div class="container">

  <nav class="navbar navbar-default">
    <div class="container-fluid">
      <div class="navbar-header">

where a container-fluid is clearly nested inside a a container. My understanding of the "neither container is nestable" sentence is that we should have just one container in a page, or on the other hand we can have multiple if they are not nested one within the other.
Seeing the examples it doesn't seem to be the case, then what does it mean that constraint? I've read also this question and some others but they don't talk about the nesting thing.

Upvotes: 3

Views: 1375

Answers (1)

Carol Skelly
Carol Skelly

Reputation: 362270

This has been brought up as in issue on the Bootstrap repo:

https://github.com/twbs/bootstrap/issues/15512

I'm not sure if the doc will be updated accordingly, but as you'll see in the issue it looks like it's ok to put a container-fluid inside a container.

Upvotes: 5

Related Questions