From the course: Creating a Responsive Web Design

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Setting page breaks with CSS

Setting page breaks with CSS - CSS Tutorial

From the course: Creating a Responsive Web Design

Setting page breaks with CSS

- So now that we've completed our print rules let's go up to the File menu and let's come down and choose Print. Most web browsers will have some sort of print preview so you can get a sense of what the page will look like, and if you're in the final phases of your design I would definitely recommend printing out a few pages, especially to do things like test a QR code. And within my print preview I can see all of the content fitting on a portait page. And now I'll come over here and change the orientation. So now I can see in landscape view, I can see part of the How To section and if I go to page two I can see the rest of that section. So there are some page-break rules we can put into our CSS to tell the browser which sections of content we would like to keep together if it's at all possible. So I'll cancel out of that print dialog box, let's go back to the CSS, and I'm going to scroll up until I find the section.how-to rule. So we'll set a property in here to ask the browsers to…

Contents