Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
William J. Terrell
17,403 PointsExcluding a Single Page from a Print Stylesheet
Simple question this time :) I'm just wanting to know if it is possible to exclude a single page from a print style-sheet. I am just trying to exclude the homepage of our site from the "content-only" print style-sheet that will be applied to the rest of the site.
Thanks!
1 Answer
Marco Poletto
Courses Plus Student 10,099 Pointsyes is possible using javascript. You can trigger the event when the link to page to eclude is clicked. Put an id to the <link> tag of the stylesheet. Select it with getElementById or $("id") and remove() it
p.s.remember to put a callback function or the css will continue to stay removed. If you nedd a better explanation just ask :)