41 users online (1 members and 40 guests)  


  Results 1 to 8 of 8

Related

  1. Replies: 6
  2. print stylesheet question    Forum: CSS Forum
    Replies: 1
  3. Stylesheet/table problem    Forum: CSS Forum
    Replies: 3
  4. Stylesheet producing ugly tables    Forum: CSS Forum
    Replies: 6
  5. Replies: 2
  1. #1
    Nikita's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    5

    CSS Print stylesheet

    Hi,
    All the content of my web page is in a table which is 760 pixels width.
    This is fine on the screen, but when printing, the right part is cut.
    I tried to set a new css print stylesheet to avoid this problem, but it is not working.

    I tried to change the margin and padding, but there is no change. I still have the same problem.

    <link rel="stylesheet" type="text/css" href="print.css" media="print">

    I tried many different configurations, but none of them worked... I did probably something wrong.

    I know that the page is properly printed if I change manually the print setting (file -> page setting) margin to 5mm, but how can I do it with the css, in order than everybody who would like to print the page has the complete page printed?

    Could someone help me?

    Many thanks

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Could I have a link to the webpage?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    Nikita's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    5
    Well,

    It is not yet online...

    But as an example, you can take this page.

    If you try to print this page, you can see the same problem. The right part is cut.

    How to configure a print.css to change the margin of the page, in order to have everything printed (everything should be displayed).

    Thanks

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Set a margin in your print.css. Or change the width of the table in your print.css
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    Nikita's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    5
    I tried to set the margin, but it is not working.

    I defined a <div id="page"> </div> in my html, which includes all the content of my page.

    Then, in my print.css I put this:

    #page {
    width:100%;
    background:#FFFFFF;
    border-top: 0;
    margin: 0;
    padding: 0;
    }

    But it is not working... I still have the default margin. It doesn't change the left and right margin.

    You said that I can change the width of the table in my print.css. But how can I do that?

    Here is my html code:
    <table width="760" border="0" cellspacing="0" cellpadding="0">

    Can I have a different width when I print my page, than on screen?

    Could you please explain to me how to do that? I'll try.

    Thanks

  6. #6
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    change

    width: 100%;

    to width: 75%;

    see what happens.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  7. #7
    Nikita's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    5
    Nothing happens...

    No difference between 100% and 75%...

  8. #8
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Okay. Could you upload the website somewhere temporarilly? Otherwise, I'm just guessing and we could be here for weeks
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread