You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You now have connected the Bootstrap CDN to your project and can begin using Bootstrap 4! Hooray.
Add a styles.css document, link it to your html document AFTER the bootstrap link.
Containers and the Grid System
Add a div to your html document, using bootstraps container class, have this be a container.
To visually see what a container class does to a div, we will need to apply some styling to it in css. Let’s go to our CSS document and apply a background-color of blue and a height of 500px to anything with a class named container (Which for know should only be 1 element).
Change the class on the div from a container to a container-fluid. Refresh and take not of the differences. Once you are finished visually seeing the difference between the two, remove or comment out the styling in the css file.
Insert a div inside of the existing container div. Give this div a class name of row, then insert an h1 element inside of the row div. Have the text read “First Boostrap Project”.
Refer this link on the grid system to learn how rows and alignment work using bootstrap. Lets try to center align our h1, go to the following link to explore how to do so.
Hint:
Jump to the horizontal alignment section of bootstraps documents, you may need to adjust the amount of columns, 1 through 12, to keep everything on 1 line).
Add a new div which will be another row of elements. Add 3 divs, give each some text of your choice and apply bootstrap styling to have 1 div appear at the start of the row, one in the center, and one at the end.
Outside of the form but still inside of the container, create a basic card with a card body and have it have an h3 which will be a friends name, and a paragraph element containing a small piece of info on your friend. Create 6 of these cards.
Have them align so there are 2 per row.
Once you get them aligning 2 per row, change it so it is 3 per row.
About
Bootstrap Drills Lab for Covalence Full-Stack Bootcamp