skip to Main Content

Is it good practice to use multiple .container and .container-fluids? (not nested)

I’d like to create some segments of my page with max-width and some without any.

3

Answers


  1. You can use any number of ‘.containers’ and ‘.container-fluid”s in a page. Beware when you are using nested ‘.container’ since its having fixed widths at breakpoints. The examples in the bootstrap site itself have used multiple containers. So you can use..

    This is well answered here: Multiple and/or nested Bootstrap containers?

    Login or Signup to reply.
  2. Usually, with Bootstrap I use more than one container: one for the main content itself, the normal one; one inside the .header; and one inside the .footer.

    You can use both, and also nested if required in your layout web page.

    Login or Signup to reply.
  3. I’m currently using a .container for each section on my website. It’s based on this template: http://blackrockdigital.github.io/startbootstrap-stylish-portfolio/.

    As long as you don’t nest them you’ll be good!

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