Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap grid exercise #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions BootstrapFour.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,26 @@
</head>
<body>
<!-- Use the cute kitty pictures bellow, and arrange them into the desired result. You'll need the one style item defined above to complete this properly. The rest is all Bootstrap. -->

<img class='img-responsive' src='http://placekitten.com/g/490/490'>
<img class='img-responsive' src='http://placekitten.com/g/500/500'>
<img class='img-responsive' src='http://placekitten.com/g/510/510'>
<img class='img-responsive' src='http://placekitten.com/g/495/495'>
<img class='img-responsive' src='http://placekitten.com/g/810/810'>
<img class='img-responsive' src='http://placekitten.com/g/520/520'>
<img class='img-responsive' src='http://placekitten.com/g/530/530'>
<img class='img-responsive' src='http://placekitten.com/g/540/540'>
<img class='img-responsive' src='http://placekitten.com/g/550/550'>
<div class="container">
<div class="row">
<div class="col-sm-3 col-xs-6 nopadding">
<img class='img-responsive' src='http://placekitten.com/g/490/490'>
<img class='img-responsive' src='http://placekitten.com/g/500/500'>
</div>
<div class="col-sm-3 col-xs-6 nopadding">
<img class='img-responsive' src='http://placekitten.com/g/510/510'>
<img class='img-responsive' src='http://placekitten.com/g/495/495'>
</div>
<div class="col-sm-6 col-xs-12 nopadding">
<img class='img-responsive' src='http://placekitten.com/g/810/810'>
</div>
</div>
<div class="row">
<img class='img-responsive nopadding col-sm-6 col-md-3' src='http://placekitten.com/g/520/520'>
<img class='img-responsive nopadding col-sm-6 col-md-3' src='http://placekitten.com/g/530/530'>
<img class='img-responsive nopadding col-sm-6 col-md-3' src='http://placekitten.com/g/540/540'>
<img class='img-responsive nopadding col-sm-6 col-md-3' src='http://placekitten.com/g/550/550'>
</div>
</div>
</body>
</html>
</html>
6 changes: 3 additions & 3 deletions BootstrapOne.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
<!-- Add the correct Bootstrap classes to achieve the desired result. The styling defined above has already been applied. -->
<div class="">
<div class="header">Header</div>
<div class="nav">Nav</div>
<div class="body">Body</div>
<div class="footer">Footer</div>
<div class="nav col-sm-2">Nav</div>
<div class="body col-sm-10">Body</div>
<div class="footer" style="clear: both">Footer</div>
</div>
</body>
</html>
10 changes: 7 additions & 3 deletions BootstrapThree.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@

<!-- You'll need to add a bit of your own styling to get the desired result. -->
<style type="text/css">

.block {
height: 200px;
overflow: auto;
}
</style>
</head>
<body>
<!-- Add the divs you'll need to achieve the desired result bellow this line. -->

<div style="background-color: black" class="block col-xs-12 col-sm-6"></div>
<div style="background-color: blue" class="block col-xs-12 col-sm-6 col-md-3"></div>
<div style="background-color: red" class="block col-md-3 hidden-xs hidden-sm"></div>
</body>
</html>
11 changes: 10 additions & 1 deletion BootstrapTwo.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@
.fill {
border: 1px solid black;
background-color: yellow;
overflow: auto;
}
</style>
</head>
<body>
<!-- A little less help this time. You'll need to add the remaining divs, and use the fill class from the style defined at the top of the doc. -->
<div class="fill">This first column will be too large when the rows wrap, so you have to figure out how to get the second row to display properly.</div>
<div class="container">
<div class="fill col-xs-6 col-sm-3">This first column will be too large when the rows wrap, so you have to figure out how to get the second row to display properly.</div>
<div class="fill col-xs-6 col-sm-3">Second</div>

<div class="clearfix visible-xs-block"></div>

<div class="fill col-xs-6 col-sm-3">Third</div>
<div class="fill col-xs-6 col-sm-3">Fourth</div>
</div>

</body>
</html>