Question
You may use predefined grid classes (as shown below), grid mixins, or inline widths. Note that the other columns will resize no matter the width of the center column.
click below
click below
Question
Create equal-width columns that span multiple rows by inserting a .w-100 where you want the columns to break to a new line. Make the breaks responsive by mixing the .w-100 with some responsive display utilities.
Normal Size Small Size show me how
IT0043 MOD 4
Reviewer
Question | Answer |
---|---|
Setting one column width You may use predefined grid classes (as shown below), grid mixins, or inline widths. Note that the other columns will resize no matter the width of the center column. | True |
Equal-width multi-row Create equal-width columns that span multiple rows by inserting a .w-100 where you want the columns to break to a new line. Make the breaks responsive by mixing the .w-100 with some responsive display utilities. | True |
The padding is then counteracted on the cols with negative margins. This way, all the content in your columns is visually aligned down the left side. | False |
Thanks to flexbox, grid columns without a specified width will automatically layout as equal width columns. For example, four instances of .col-sm will each automatically be 25% wide from the small breakpoint and up. | True |
Responsive classes Bootstrap’s grid includes five tiers of predefined classes for building complex responsive layouts. Customize the size of your columns on extra small, small, medium, large, or extra large devices however you see fit. | True |
Mix and match Don’t want your columns to simply stack in some grid tiers? Use a combination of different classes for each tier as needed. See the example below for a better idea of how it all works. | True |
Rows are non-wrappers for columns. | False |
Column widths are set in percentages, so they’re always fluid and sized relative to their parent element. | True |
To make the grid responsive, there are six grid breakpoints, one for each responsive breakpoint: all breakpoints (extra small), small, medium, large, and extra large. | False |
Equal-width For example, here are two grid layouts that apply to every device and viewport, from xs to xl. Add any number of unit-less classes for each breakpoint you need and every column will be the same width. | True |
Responsive breakpoints Since Bootstrap is developed to be mobile first, we use a handful of media queries to create sensible breakpoints for our layouts and interfaces. | True |
Button group Group a series of buttons together on a single line with the button group, and super-power them with JavaScript. | True |
Fluid Use .container-fluid for a full width container, spanning the entire height of the viewport. | False |
While containers can be nested, most layouts do not require a nested container. | True |
Reboot A collection of element-specific CSS changes in a single file, kickstart Bootstrap to provide an elegant, consistent, and simple baseline to build upon. | True |
Page defaults The <html> and <body> elements are updated to provide better page-wide defaults. | True |
Construction are the most basic layout element in Bootstrap and are required when using our default grid system. | False |
All-in-one Our default .container class is a non-responsive, fixed-width container, meaning its max-width changes at each breakpoint | False |
Clearfix Quickly and easily clear floated content within a container by adding a clearfix utility. | True |
Buttons Use Bootstrap’s custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more. | True |
No gutters The gutters between columns in our predefined grid classes can be removed with .no-gutters. This removes the negative margins from .row and the horizontal padding from all immediate children columns. | True |
Alignment Use flexbox alignment utilities to vertically and horizontally align columns. | True |
Grid System, use our powerful Mobile-first flexbox grid to build layouts of all shapes and sizes. | True |
Be aware of the limitations and bugs around flexbox, like the inability to use some HTML elements as flex containers. | True |
Containers provide a means to vertically and horizontally pad your site’s contents. | False |
While Bootstrap uses ems or rems for defining most sizes, pxs are used for grid breakpoints and container widths. This is because the viewport width is in pixels and does not change with the font size. | False |
Grid breakpoints are based on minimum width media queries, meaning they apply to that one breakpoint and all those above it (e.g., .col-sm-4 applies to small, medium, large, and extra large devices, but not the first xs breakpoint). | True |
Across Bootstrap, you’ll see this most clearly in our media queries. In most cases, we use min-width queries that begin to apply at a specific breakpoint and carry up through the higher breakpoints. | True |
Approach Additional styling is done only with classes. For example, we reboot some <table> styles for a simpler baseline and later provide .table, .table-bordered, and more. | True |
Modifier classes should only be used when there are multiple properties or values to be changed across multiple variants. | True |
Bootstrap’s responsive styles are built to be responsive, an approach that’s often referred to as mobile-first. We use this term in our docs and largely agree with it, but at times it can be too broad. | True |
Responsive do not allows you to specify a class that is 100% wide until the specified breakpoint is reached, after which we apply max-widths for each of the higher breakpoints. | True |
While containers can be nested, most layouts do require a nested container. | False |
Borders Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element. | True |
Containers are the most basic layout element in Bootstrap and are required when using our default grid system. | True |
Variables and maps determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below. | True |
Variable width content Use col-{breakpoint}-auto classes to size columns based on the natural width of their content. | True |
Margin utilities With the move to flexbox in v4, you can use margin utilities like .mr-auto to force sibling columns away from one another. | True |
Bootstrap’s grid system uses a series of containers, rows, and columns to layout and align content. | True |
The padding is then counteracted on the rows with negative margins. This way, all the content in your columns is visually aligned down the left side. | True |
Offset classes Move columns to the right using .offset-md-* classes. These classes increase the left margin of a column by * columns. For example, .offset-md-4 moves .col-md-4 over four columns. | True |
Several Bootstrap components utilize z-index, the CSS property that helps control layout by providing a third axis to arrange content. | True |
Z-index We don’t encourage customization of these individual values; should you change one, you likely need to change them all. | True |
Responsive breakpoints Since Bootstrap is developed to be Desktop first, we use a handful of media queries to create sensible breakpoints for our layouts and interfaces. | False |
All-in-one Our default .container class is a responsive, fixed-width container, meaning its max-width changes at each breakpoint. | True |
Bootstrap comes with four different containers. | False |
Approach Learn about the guiding principles, strategies, and techniques used to build and maintain Bootstrap so you can more easily customize and extend it yourself. | True |
Use .container for a responsive pixel width or .container-fluid for width: 100% across all viewport and device sizes. | True |
Customizing the grid Using our built-in grid Sass variables and maps, it’s possible to completely customize the predefined grid classes. Change the number of tiers, the media query dimensions, and the container widths—then recompile. | True |
Bootstrap comes with three different containers. | True |
Alerts Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. | True |
Bootstrap primarily uses the following media query ranges or breakpoints in our source Sass files for our layout, grid system, and components. | True |
Breadcrumb Indicate the current page’s location within a navigational hierarchy that automatically adds separators via CSS. | True |
The box-sizing is globally set on every element—including *::before and *::after, to border-box. This ensures that the declared width of element is never exceeded due to padding or border. | True |
Setting one column width Auto-layout for flexbox grid columns also means you can set the width of one column and have the sibling columns automatically resize around it. | True |
All breakpoints For grids that are the same from the smallest of devices to the largest, use the .col and .col-* classes. Specify a numbered class when you need a particularly sized column; otherwise, feel free to stick to .col. | True |
Offsetting columns You can offset grid columns in two ways: our responsive .offset- grid classes and our margin utilities. Grid classes are sized to match columns while margins are more useful for quick layouts where the width of the offset is variable. | True |
Bootstrap’s grid system uses an array of containers, rows, and columns to layout and align content. | False |
Sass mixins When using Bootstrap’s source Sass files, you have the option of using Sass variables and mixins to create custom, semantic, and responsive page layouts. | True |
To make the grid responsive, there are five grid breakpoints, one for each responsive breakpoint: all breakpoints (extra small), small, medium, large, and extra large. | True |
In a grid layout, content must be placed within columns and only columns may be immediate children of rows. | True |
Z-index These higher values start at an arbitrary number, high and specific enough to ideally avoid conflicts. We need a standard set of these across our layered components—tooltips, popovers, navbars, dropdowns, modals. | True |
Construction are used to contain, pad, and (sometimes) center the content within them. | False |
Fluid Use .container-fluid for a full width container, spanning the entire width of the viewport. | True |
Construction and options for laying out your Bootstrap project, including wrapping containers, a powerful grid system, a flexible media object, and responsive utility classes. | False |
Badges Documentation and examples for badges, our small count and labeling component. | True |
Responsive containers are new in Bootstrap v4.4. | True |
Rows are wrappers for columns. | True |
Column breaks Breaking columns to a new line in flexbox requires a small hack: add an element with width: 100% wherever you want to wrap your columns to a new line. | True |
Nesting To nest your content with the default grid, add a new .row and set of .col-sm-* columns within an existing .col-sm-* column. | True |
Approach Reboot builds upon Normalize, providing many HTML elements with somewhat opinionated styles using only element selectors. | True |
The <body> also sets a global font-family, line-height, and text-align. This is inherited later by some form elements to prevent font inconsistencies. | True |
Various form elements have been rebooted for simpler base styles. | True |