Viewers: in countries Watching now:
Discover how to make your website more readable and efficient across various screen sizes and devices. Join author Chris Converse as he shares his own specialized techniques for creating a responsive site. The course takes the site from start-to-finish, from comping your ideas in Photoshop, to setting up the HTML page and containers, to styling established elements for small, medium, and large screens. In particular, Chris shows how to load images with CSS, reposition the nav bar for better viewing on mobile devices, and how to make the download time faster for small screens by providing multiple versions of your banner graphic and other images. Plus, learn how to replace graphics with high-resolution versions for Retina displays using CSS media queries.
This course was created and produced by Chris Converse. lynda.com is honored to host this training in our library.
Now, at this point, we're ready to start creating some CSS rules for our layout. So in your text editor, let's choose File > Open. From the myWebsite directory, go into the css directory and open screen_layout_large.css. Now, inside of here, we're going to put our CSS rules for our large screen, which is also going to be used by default for browsers that don't support media queries. So under the comment here that says "global rules for all sizes," let's come in here and add a body tag. Beginning and ending bracket. What we're going to do in here is set the margin to 0 and the padding to 0.
This will make sure that the page container can touch the top, left, and rightmost areas of our window. Next rule we're going to create is going to target the anchor Link inside of the header area that we put a logo class on. So we're going to start with header, space, a.logo, beginning and ending bracket. Let's split that open. So anchor links by default have a display type of inline, which means the length or the height of the actual link is only as large as the content inside. Now, we created an empty anchor link for our logo, so we're going to give this dimensions.
So we're going to set the display type to block. This will make the anchor link behave more like a paragraph or a div tag. The next property we're going to set is going to be position. So we're going to set position to absolute. This will give us the ability to position the logo inside of the page container, which has a position set relative. Next property, we're going to set background- position, 0 pixels on the X and 0 pixels on the Y. Next rule, we're going to set background-repeat. We're going to set that to no-repeat.
Save your work. Let's come back out and look at this in a browser. When we hit reload, we'll now see that the page container now touches the top area of this window. If I come down here and collapse the window down, we'll see that the page container actually touches the rightmost area and the leftmost area as well. So taking off the margin and padding on the body tag allows the elements inside to touch the edge of the window. So now with those rules in place, next, we'll work on the heading area.
Find answers to the most frequently asked questions about Creating a Responsive Web Design .
Here are the FAQs that matched your search "" :
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.
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.