Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Now, the last thing we want to adjust on medium screens is going to be the promo area. If I come in here and resize the browser, we'll see that having the text show up on the right-hand side of the images leaves very little room for the text, so what we're going to do is rearrange the text inside up here to show up underneath of the images. Now to do that, let's come back to our text editor. After the navigation rules inside of our screen_layout_ medium.css file, let's start by targeting the promo_container. So let's start with the .promo_container, put in our brackets.
We're going to set a padding of 0 on the top, 20 on the right, 15 on the bottom, and 20 on the left. Let's come in here and copy the promo_container name. Let's hit a few returns. Let's paste promo_container .promo, beginning and ending bracket. We're going to set background-position here to 0 on the x and 0 on the y. Set another rule, .promo_container .promo .content.
Now we're going to target the content divs inside of each one of the individual promos. In here we're going to set padding. We're going to set 70 on the top, 30 on the right, 0 on the bottom, and 0 on the left. So what's going to happen here is the text is going to push away from the top 70 pixels, but the left is going to be set back to 0 so the text will now align to the left-hand side of the promo area. Now there's one last rule I want to create, and that's going to be for the body tag.
So let's add body, beginning and ending bracket, and what I want to do here is take away the background image. Since we can't actually see the background image on a medium screen, I don't want the users to download that extra graphic. So let's come in here and let's come down to background-image and let's add none. Let's choose File > Save. Let's come back out to our browser. Let's hit Reload, and now you see that the text positioned itself 70 pixels down from the top and aligns on the left-hand side to give us the typography coming underneath of the images instead of floating over to the right-hand side.
Now we have all of these CSS rules in place for the medium screens. Next we're going to target the small screens.
Get unlimited access to all courses for just $25/month.Become a member
117 Video lessons · 43024 Viewers
119 Video lessons · 54345 Viewers
65 Video lessons · 14570 Viewers
113 Video lessons · 82927 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.