dir.by  
  Search  
Programming, development, testing
Bootstrap - buttons, menus, dialog, slider ... Containers for placing elements
Containers in the Bootstrap ("container-fluid" and "container")
  Looked at 6711 times    
 Containers in the Bootstrap ("container-fluid" and "container") 
last updated: 9 January 2019
container-fluid for such an element, the width is not limited and it is 100% of the screen.
In other words, it is a block element and it stretches to the entire width of the screen.
container-fluid does not contain left and right indentation.

container for such an element the maximum width is limited 1200px
container contains left and right indents.
If the screen is smaller 1200px then container will take the entire width of the screen minus left and right indents.
Example
  Html  
<html>

     <!-- heading -->
     <head>
          <meta charset="utf-8">
          <title>Example</title>
     </head>

     <!-- page -->
     <body>

          <!-- connect library Bootstrap (js file) -->
          <script src="https://dir.by/example_lib/bootstrap-4.1.3/js/bootstrap.min.js"></script>
    
          <!-- connect library Bootstrap (css file) -->
          <link rel="stylesheet" href="https://dir.by/example_lib/bootstrap-4.1.3/css/bootstrap.min.css">
    
          <!-- HTML Elements -->
          <div class="container" style='background-color:gold;'>
               container
          </div>

          <br>

          <div class="container-fluid" style='background-color:lightblue;'>
               container-fluid
          </div>

     </body>

</html>
Example we look, we test
Note!
container-fluid is not embedded inside container
  Html     this is not correct
<div class="container">
     <div class="container-fluid">
     </div>
</div>
 
container is not embedded inside container-fluid
  Html     this is not correct
<div class="container-fluid">
     <div class="container">
     </div>
</div>
Where it is used "container"
container used for row ...
Where it is used "container-fluid"
container-fluid used for row ...
as well as used for navbar ...
 
← Previous topic
Bootstrap where to download and how to connect?
 
Next topic →
Bootstrap 4 difference from Bootstrap 3
 
Your feedback ... Comments ...
   
Your Name
Your comment (www links can only be added by a logged-in user)

  Объявления  
  Объявления  
 
What the Bootstrap?
Bootstrap where to download and how to connect?
Containers in the Bootstrap ("container-fluid" and "container")
Bootstrap Version 4.0
Bootstrap 4 difference from Bootstrap 3
Elements
"Navbar" in the Bootstrap 4.0 - this is the main horizontal menu for the site (navigation headers)
Styles
class="form-inline" items on a single line | Bootstrap 4.0
class="navbar-expand-lg" disappears if the area size is smaller lg | Bootstrap 4.0
class="mr-auto" move to the right edge , class="ml-auto" move to the left edge | Bootstrap 4.0
Vertical indentation, horizontal indentation | Bootstrap 4.0
to study
WEB Sites to explore Bootstrap 4.0
Bootstrap items for the version 3 and 4
Create a grid "col-md-number" in the Bootstrap 3 and Bootstrap 4
WWW sites for learning Bootstrap
Sites to explore Bootstrap

  Ваши вопросы присылайте по почте: info@dir.by  
Яндекс.Метрика