Bootstrap Notes For Assignment 02
Bootstrap Notes For Assignment 02
Without Bootstrap
But by using the Bootstrap we do not need to set the width,padding , margins etc.
We have four different kinds of breakpoint so in order to make the website responsive for different
devices we have to design for each device.
3-bootstrapCDN
In bootstrap CSS file, separate media query is written for different break points to make the web
pages responsive/adaptive.
In order to do your own styling do not change main bootstrap.css file but make your own
Remember :
Always put your css file after bootstrap.css file, because your file style.css will over-write
bootstrap.css.
In order to see the width of container , right click page and click inspect(in
google chrome) and inspect element(in firefox) to see in google or firefox
developer tool
Col class
In order to divide the row in equal width of length we use bootstrap col class.
Manually break the div we use w-100 class
We use row-cols-2 to automatically add two colums in in row
Output
Do it responsive by stretching through google developer tool ..
Bootstrap have different media query for different screen sizes and bootstrap have different classes.
If we apply col-md , and stretch the web to col-md, col-lg and col-xl, then the
width of div tag will be equally length. But if we shrink to that extent in which
the div width becomes col-sm or less than col-sm than div tag width will be
100 per cent automatically.
Example
We have shrink to col-sm, each div take width 100 per cent.
Previously , the col class divide the row class in equal length, but in actual
requirements we always do not need to equal length columns. So we have Grid
System in bootstrap CSS.
Below Grid is out of bound
Design the following website with Grid System
Output
Without border
With border
See the responsive behavior in small screen