homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

Printing probs with Firefox

5+ Year Member

Msg#: 4286369 posted 5:09 pm on Mar 23, 2011 (gmt 0)


I have a wordpress site. It's a site with a few static pages as well as a main blog page. And of course, the posts open up into their own individual pages.

I wanted to insert some css code to style what gets printed. I'm MAINLY interested in making individual blog posts more attractive. (Printing the general site pages is fine, too, of course.)

As you guys probably know, without some styling, every section prints out in big Times (I think) font. So you get the header, the nav, the sidebar, the content, the footer, etc.

I added this to my stylesheet:

Print Instructions
@media print {
body {background:white; color:black; margin:0 }

#sidebar { display:none }


After that, when I print everything looks great--styled in same way as the actual site. The only problem is that, on Firefox alone, the individual blog post content doesn't appear.

I see it in the print previews on Safari and Chrome (haven't tested Opera yet). And it prints fine.

Can anyone help me? Is there some code I need to add? (I'm not a pro coder so this is hard for me to figure out.)

Someone has told me that I am loading the exact same style sheet for screen and for print. And the rules I have included are causing the prob. But why would posts print fine in Safari and Chrome but not FF?

He said i cd use a single sheet, but limit which parts work on print/screen by using more than one @media selector.

So I'm confused. I thought the code I included focused on print as it is.

Sorry to be so longwinded but wanted to give the background and the crux of what I want to accomplish as well as what actually IS working.

Thanks for your help.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved