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
Geert-Jan Hendriks
23,126 PointsHelp needed with a print stylesheet
Hello,
I've created a webapp, wich presents data in a table. The table is styled with css. The table has a border set through css (1px solid #000). I also created a print stylesheets, wich hides certain elements on the page when the user prints it. Everything works just fine, exept the borders of the table aren't visible when printing.
Who knows a solution?
5 Answers
Adam Lake
3,810 PointsI Havent used print style sheets before but could it be possible that your print style sheet is overwriting the other style sheet? (what order you have put it in the head section) Have you tried including the border style in the print css sheet?
Adam Lake
3,810 PointsI Havent used print style sheets before but could it be possible that your print style sheet is overwriting the other style sheet? (what order you have put it in the head section) Have you tried including the border style in the print css sheet?
Adam Lake
3,810 PointsI Havent used print style sheets before but could it be possible that your print style sheet is overwriting the other style sheet? (what order you have put it in the head section) Have you tried including the border style in the print css sheet?
Geert-Jan Hendriks
23,126 PointsThanks Adam, it worked! I assumed that when I put the styles for the table in the screen stylesheet, it would be inherited by the print stylesheet. Turns out you have to style the borders also in the print stylesheet. Thank you!
Adam Lake
3,810 PointsNo problem :) glad its sorted ! sorry about the duplicate posts, not sure what happened there :S