Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Now to target small screens, let's come back to our text editor. Let's choose File > Open. From the myWebsite folder, go into the css directory and let's open up screen_layout_small.css. Now, inside of here, we're going to start by targeting the header, beginning and ending bracket. We're going to set a height of 75 pixels. We're going to set background: url(../images/banner_small.jpg).
Set no-repeat, set right for the X position, and 0 pixels for the Y position. Let's hit a few returns. Now let's target the logo, so header a.logo. Now we'll set the brackets. Let's split that open. The first property is going to be width. We're going to set that to 105 pixels. Next, we're going to set the height to 40 pixels. Next, we're going to set the top property to 16 pixels.
We're going to set the right property to 15 pixels. And then finally, we're going to set the background-image: url(../images/logo_small.png);. After header, let's come in here and let's quickly add in our article.
Put in our brackets. For the padding here, we're going to set 20 pixels on the top, 20 on the right, 10 on the bottom, and 20 on the left, and then hit Save. Let's come back out to our browser. Let's hit Reload, and let's resize the browser down to under 500 pixels. So once we hit that threshold here, we can see the difference between medium, which is here, and small. So now our header is now showing up at only 75 pixels. We have the smaller version of our logo, and we have the extra padding around the article area.
Now that we have the header and logo and article styles for small screens, next we'll focus on the navigation element.
Get unlimited access to all courses for just $25/month.Become a member
119 Video lessons · 50074 Viewers
117 Video lessons · 37407 Viewers
113 Video lessons · 81220 Viewers
65 Video lessons · 10711 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.