2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								id: bad87fee1348bd9acde08712
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								title: Use Responsive Design with Bootstrap Fluid Containers
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								challengeType: 0
							 
						 
					
						
							
								
									
										
										
										
											2019-07-31 11:32:23 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								forumTopicId: 18362
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Description
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< section  id = 'description' > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								In the HTML5 and CSS section of freeCodeCamp we built a Cat Photo App. Now let's go back to it. This time, we'll style it using the popular Bootstrap responsive CSS framework.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Bootstrap will figure out how wide your screen is and respond by resizing your HTML elements - hence the name < code > Responsive Design< / code > .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								With responsive design, there is no need to design a mobile version of your website. It will look good on devices with screens of any width.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								You can add Bootstrap to any app by adding the following code to the top of your HTML:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< code > & #60 ; link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/& #62 ; </ code > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								In this case, we've already added it for you to this page behind the scenes. Note that using either < code > >< / code >  or < code > />< / code >  to close the < code > link< / code >  tag is acceptable.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								To get started, we should nest all of our HTML (except the < code > link< / code >  tag and the < code > style< / code >  element) in a < code > div< / code >  element with the class < code > container-fluid< / code > .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / section > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Instructions
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< section  id = 'instructions' > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / section > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Tests
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< section  id = 'tests' > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```yml
							 
						 
					
						
							
								
									
										
										
										
											2018-10-04 14:37:37 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								tests:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  -  text: Your < code > div</ code >  element should have the class < code > container-fluid</ code > .
							 
						 
					
						
							
								
									
										
										
										
											2019-07-24 23:53:37 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    testString: assert($("div").hasClass("container-fluid"));
							 
						 
					
						
							
								
									
										
										
										
											2018-10-04 14:37:37 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  -  text: Make sure your < code > div</ code >  element has a closing tag.
							 
						 
					
						
							
								
									
										
										
										
											2019-07-24 23:53:37 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    testString: assert(code.match(/< \/div > /g) &&  code.match(/< div / g )  &&  code . match (/< \/div > /g).length === code.match(/< div / g ). length ); 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-04 14:37:37 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  -  text: Make sure you have nested all HTML elements after the closing < code > style</ code >  tag in < code > .container-fluid</ code > .
							 
						 
					
						
							
								
									
										
										
										
											2019-07-24 23:53:37 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    testString: assert($(".container-fluid").children().length >= 8);
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / section > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Challenge Seed
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< section  id = 'challengeSeed' > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< div  id = 'html-seed' > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```html
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< link  href = "https://fonts.googleapis.com/css?family=Lobster"  rel = "stylesheet"  type = "text/css" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< style > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  .red-text {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    color: red;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  h2 {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    font-family: Lobster, Monospace;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  p {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    font-size: 16px;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    font-family: Monospace;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  .thick-green-border {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    border-color: green;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    border-width: 10px;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    border-style: solid;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    border-radius: 50%;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  .smaller-image {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    width: 100px;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / style > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< h2  class = "red-text" > CatPhotoApp< / h2 > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< p > Click here for < a  href = "#" > cat photos< / a > .< / p > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< a  href = "#" > < img  class = "smaller-image thick-green-border"  src = "https://bit.ly/fcc-relaxing-cat"  alt = "A cute orange cat lying on its back." > < / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< p > Things cats love:< / p > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< ul > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > cat nip< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > laser pointers< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > lasagna< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / ul > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< p > Top 3 things cats hate:< / p > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< ol > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > flea treatment< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > thunder< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > other cats< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / ol > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< form  action = "/submit-cat-photo" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < label > < input  type = "radio"  name = "indoor-outdoor" >  Indoor< / label > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < label > < input  type = "radio"  name = "indoor-outdoor" >  Outdoor< / label > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < label > < input  type = "checkbox"  name = "personality" >  Loving< / label > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < label > < input  type = "checkbox"  name = "personality" >  Lazy< / label > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < label > < input  type = "checkbox"  name = "personality" >  Crazy< / label > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < input  type = "text"  placeholder = "cat photo URL"  required > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < button  type = "submit" > Submit< / button > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / form > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / div > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / section > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Solution
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< section  id = 'solution' > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-02 05:24:38 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```html
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< link  href = "https://fonts.googleapis.com/css?family=Lobster"  rel = "stylesheet"  type = "text/css" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< style > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  .red-text {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    color: red;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  h2 {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    font-family: Lobster, Monospace;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  p {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    font-size: 16px;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    font-family: Monospace;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  .thick-green-border {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    border-color: green;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    border-width: 10px;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    border-style: solid;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    border-radius: 50%;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  .smaller-image {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    width: 100px;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / style > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< div  class = "container-fluid" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < h2  class = "red-text" > CatPhotoApp< / h2 > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< p > Click here for < a  href = "#" > cat photos< / a > .< / p > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< a  href = "#" > < img  class = "smaller-image thick-green-border"  src = "https://bit.ly/fcc-relaxing-cat"  alt = "A cute orange cat lying on its back." > < / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< p > Things cats love:< / p > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< ul > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > cat nip< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > laser pointers< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > lasagna< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / ul > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< p > Top 3 things cats hate:< / p > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< ol > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > flea treatment< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > thunder< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < li > other cats< / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / ol > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< form  action = "/submit-cat-photo" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < label > < input  type = "radio"  name = "indoor-outdoor" >  Indoor< / label > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < label > < input  type = "radio"  name = "indoor-outdoor" >  Outdoor< / label > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < label > < input  type = "checkbox"  name = "personality" >  Loving< / label > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < label > < input  type = "checkbox"  name = "personality" >  Lazy< / label > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < label > < input  type = "checkbox"  name = "personality" >  Crazy< / label > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < input  type = "text"  placeholder = "cat photo URL"  required > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < button  type = "submit" > Submit< / button > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / form > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< / div > 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2019-07-18 08:24:12 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								< / section >