Best Florida Beaches
June 4, 2018
Generated Lorem Ipsum...
To open the inspector, right-click on the website and select "inspect".
.container {
display: flex;
}
Referred to as "dummy" or "filler" text. Lorem Ipsum is used as a placeholder when styling a layout with text. Visit lipsum.com to generate Lorem Ipsum.
Below the intro section, add the following container:
<section class="article-list"></section>
Let's make the container visible and center it on the page.
.article-list {
background-color: pink;
height: 800px;
width: 500px;
margin: auto;
}
Visit https://www.lipsum.com
Best Florida Beaches
June 4, 2018
Generated Lorem Ipsum...
Remove the temporary background color and add a background color to each article.
.article-list {
height: 800px;
width: 500px;
margin: auto;
}
article {
background-color: white;
}
Add whitespace around the article text.
article {
background-color: white;
padding: 20px;
}
Style the article title to be larger and bold.
article h2 {
font-size: 20px;
font-weight: bold;
}
Add whitespace above the list of articles.
Add whitespace around the list of articles.
.article-list {
width: 800px;
height: 800px;
margin: auto;
margin-top: 80px;
padding: 0 40px.
}
Add space between each article.
Add space around the article.
article {
background-color: white;
margin-bottom: 60px;
padding: 20px;
}
Remove the set width and height
Limit the article's max-width
.article-list {
margin: auto;
margin-top: 80px;
padding: 0 40px;
max-width: 900px;
}
Media queries set specific CSS rules based on the screen size.
For example, the following code says "For any screen that is 800px wide, or less, apply these styles".
@media only screen and (max-width: 800px) {
p {
color: red;
}
}
(800px is a width that covers most tablets and smart phones.)
Don't show the image on browsers of a certain width.
@media only screen and (max-width: 800px) {
.split-layout-container {
height: 500px;
}
.split-layout-media {
display: none;
}
.split-layout-content {
background-color: #828170;
height: 500px;
width: 100%;
}
}
You did it! You've learned how:
Be on the look out for an email with a short survey.
What would you like to learn next?
Visit the Resources page for inspiration.