Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Firefox Printing Problems

    Hello,

    I just made a website and when you print from Internet Explorer, it looks fine. However, in Firefox it prints a bit weird.

    Example page: http://www.comcec.com/public/commchange.html

    Is there a fix to this?

    Thanks

  • #2
    New Coder
    Join Date
    Aug 2007
    Posts
    66
    Thanks
    2
    Thanked 0 Times in 0 Posts
    maybe you should have a printer friendly style sheet you can switch to then print? This would remove your problem.

  • #3
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Um, can you explain?

  • #4
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    Indeed... the browsers will use their default styles to lay out a page you want to print from them, so to get something that looks more similar for different browsers you should do as Littlemiss says and create a print css to remove most of the style and images and make it look purdy when printed.

    You can also play about with the print options in FF, but they are limited compared to what a print stylesheet would allow you to do.

    <link rel="stylesheet" type="text/css" href="print.css" media="print" />
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #5
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts
    This is news to me! So I have to re-create a new style sheet for every page, just so they can print? Is there a topic somewhere where I can read more about this?

  • #6
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #7
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Thanks very much

  • #8
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts
    I have a few questions:

    1) How do you prevent the first page from being blank? None of the content is showing up until page 2

    2) How do you put a page break so it doesn't cut off text at the bottom?

    I appreciate your help, thanks

  • #9
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,778
    Thanks
    6
    Thanked 1,021 Times in 994 Posts
    First thing: From now on always apply a media attribute to your stylesheet links (except if you specifically want them to render the stylesheets in all devices). That means for your regular stylesheets that render styles on computer screens always put media="screen". This also prevents the stylesheet from being rendered by small screen devices (PDAs, mobile phones, etc.), hence being more accessible (if you wrote semantic code).

    Currently your regular stylesheets are also rendered for print layouts so you’d have to revert everything that isn’t supposed to be rendered. Now, with applying a screen media type attribute to screen stylesheets you save that work because those stylesheets aren’t rendered in print layouts. You then create a stylesheet only for print layouts with very basic formatting and hiding the navigation, etc.

    I‘ve done this on this website lately. Check out the source code and print preview.
    Last edited by VIPStephan; 08-07-2007 at 06:17 PM.

  • #10
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Wow, that was easy. Thank you for that tip! I've got it almost done how I want it. Just one other question.

    Is it possible to indicate what font size you want a specific attribute in a class to print out as?

    Example: It's in class "sbihead" and I want it to affect the <h1> only.

    thanks!

  • #11
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts
    bump!

  • #12
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,778
    Thanks
    6
    Thanked 1,021 Times in 994 Posts
    Quote Originally Posted by katie_lostsoul View Post
    It's in class "sbihead" and I want it to affect the <h1> only.
    Uhm…
    Code:
    .sbihead h1 {…}
    …maybe?

    That’s taught in the CSS beginners class.

  • #13
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Yeah, my teacher taught us absolutely nothing. Hence me taking a course in November....

    Thanks for your help


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •