scrimba
Frontend Career Path
Responsive design
Build a Responsive Site
Controlling the width of images
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Controlling the width of images
AboutCommentsNotes
Controlling the width of images
Expand for more info
index.css
run
preview
console
body {
color: #2b283a;
font-family: 'Roboto', sans-serif;
margin: 0;
}

/* ----- TYPOGRAPHY ----- */

h1,
h3 {
margin: 0;
}

h1 {
color: whitesmoke;
font-size: 36px;
}

h2 {
color: #451c7a;
font-size: 28px;
margin-top: 0;
}

h3 {
font-size: 20px;
}

p {
line-height: 23px;
}

.subheading {
display: block;
font-size: 20px;
color: #d0aaff;
}

.section-two h2 {
color: inherit;
}

/* ----- LINKS ----- */

a {
color: #ef5839;
text-decoration: underline dotted;
}

a:hover,
a:active {
color: #d4b44c;
}

.btn {
font-size: 18px;
font-weight: 500;
text-decoration: none;
display: inline-block;
padding: 10px 20px;
border-radius: 4.6px;
}

.btn-dark {
color: whitesmoke;
background: #5f29a3;
}

.btn-mid {
color: #5f29a3;
background: #f0e0ff;
}

.btn-light {
color: #5f29a3;
background: whitesmoke;
}

.btn:hover,
.btn:active {
color: #2b238a;
background-color: #f3e885;
}

/* ----- LAYOUT ----- */

header,
section,
footer {
padding: 46px 0;
}

header,
.section-two {
background-color: #5f29a3;
}

.section-two {
color: whitesmoke;
}

.container {
width: 90%;
margin: 0 auto;
}

.main-image {
width: 100%;
margin-bottom: 32px;
}

.section-two-image-container {
display: flex;
justify-content: space-between;
}

/*
Challenge:
- Make each .feature-image fluid using a percentage
- The images should display proportionally on the same line,
each taking up about half of the space
*/

.feature-image {
width: 310px;
border-radius: 4.6px;
}

footer {
text-align: center;
color: #5f29a3;
}
Console
/index.html
-2:45