From the course: Creating a Responsive Web Design

Unlock this course with a free trial

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

Linking a CSS file for print

Linking a CSS file for print - CSS Tutorial

From the course: Creating a Responsive Web Design

Linking a CSS file for print

- Now to begin developing our CSS rules for print, what we're going to do is we're going to hook in our print.css stylesheet and then we're going to comment out our screenstyles.css, just so we can gauge our progress by looking at this in the browser. So back in our HTML file, earlier we changed media type to all, let's set this back to screen. Then let's duplicate that line. Let's come in here and change screen.css to print.css Then let's temporarily set media equal to all for the print.css file. Then we'll come up here and let's comment out our screen.css file. So before the link tag, less than sign, exclamation point, two hyphens, then after the link tag hit a space, two hyphens, and then a greater than sign. So while this is commented out, the browser will not see our screen.css file, and now we can use the print style to see what's happening inside of the browser. And then when we're done, we'll set this back to media equals print and uncomment media equals screen. And now with…

Contents