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
Austin Klenk
4,399 PointsPrint CSS
Hi i am building a web page work order form in html and i am stuck on making a print style sheet. in the print.css file i am wanting to exclude the logo and make it print landscape.. any ideas?
5 Answers
Austin Klenk
4,399 Pointsshit i feel dumb.. i forgot to put href="css/print.css" "css/ in front of print.css..
Thanks
Ryan Duchene
Courses Plus Student 46,022 PointsUse a print media query:
@media print {
/* place your styles in here */
.logo {
display: none;
}
}
Is this what you're looking for?
Austin Klenk
4,399 Pointsit seams like the print.css is not being pulled..
here is the html / css connector..
<link rel="stylesheet" type="text/css" href="print.css" media="print">
Ryan Duchene
Courses Plus Student 46,022 PointsHmm...try using the media query. I don't recall having used the media="print" method before.
Also, are you looking at the page in print preview or are you still in your normal browser view?
Austin Klenk
4,399 Pointsprint preview.. and what do you mean by just using the media query.. i put that query in the print.css file..
Ryan Duchene
Courses Plus Student 46,022 PointsIf you're using the media query, you probably don't need a separate file for the print styling.
Open the development tools in your console. Do they display any errors?
Austin Klenk
4,399 Pointsit said.. "Failed to load resource: the server responded with a status of 404 (Not Found).. print.css
Ryan Duchene
Courses Plus Student 46,022 PointsThe browser can't find print.css; the link element probably has the wrong path to print.css.
Austin Klenk
4,399 Pointsya lol, I've been trying to figure that out for a hour or so :(..
Austin Klenk
4,399 Pointsthe orientation in the css is not working ..
Ryan Duchene
Courses Plus Student 46,022 PointsRyan Duchene
Courses Plus Student 46,022 PointsNo problem, friend. I can't tell you how many times that a project of mine hasn't been working because I forgot one simple thing.
I once forgot to include a CSS file for a jQuery plugin and messed around for half an hour trying to figure out what was wrong. Boy, did I feel dumb after that.
Austin Klenk
4,399 PointsAustin Klenk
4,399 Pointsthe orientation in the css is not working ;/