57 users online (0 members and 57 guests)  


  Results 1 to 4 of 4

Related

  1. I Don't Want the Page Name to Print!    Forum: HTML Forum
    Replies: 1
  2. CSS page problem    Forum: CSS Forum
    Replies: 1
  3. basic css style sheet for print    Forum: CSS Forum
    Replies: 2
  4. Strange problem with print css    Forum: CSS Forum
    Replies: 3
  5. Replies: 5
  1. #1
    dirk_xaurum's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2003
    Posts
    3

    Question problem with print style from page 2

    Hi, I'm new here, and didn't find a tread about thsi problem, so here is a new one ..

    I am having this strange problem with an @media print style sheet.
    I need it to introduce page-breaks in the output.

    It works fine for all pages (teh pagebreaks do) but I lose all border and background formatting from page 2 on.
    (when I open it in the print-preview)

    This happens in MSIE6, so no CSS2 compliance issues, I suppose.

    Mozilla keeps the borders, but loses the backgrounds.

    Any Idea what I could trie?
    I have made a dozen of alternatives, but with no luck untill know ...

    Any help would be appreciated!

    Dirk

  2. #2
    QuietDean's Avatar
    Administrator

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

    just so you know, MSIE6 isn't that CSS1 or 2 compliant

    Whilst it sounds like a browser setting, the fact that it works on page 1 rules that out. Could we have a link to your page so we can have a look at the code?
    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
    dirk_xaurum's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2003
    Posts
    3
    I will send you the link off-line, because it's a protected web application ... so I will need to grant you access with login and PW ...

    As you might notice it contains asp vars, but since I use an include instead of a hreflink to include the sheet, they get resolved ok.

    The returns are not in the container element you see over here, since I found out that htey won't work in elements with absolute positionning.

    Below is the base stylesheet I'm using:
    and after that, the code I use to insert the page breaks.
    I was thinking I made a mistake in cascading, but I don't see where ...

    @media screen {
    .results{
    background-color:#EEEEEE;
    padding-left:20px;
    padding-bottom:5px;
    padding-top:10px;
    margin-bottom : 10px;
    border-bottom: 2px solid silver;}
    .questiontext{
    border-top: 1px solid silver;
    background-color:#DDDDDD;
    padding-left:5px;
    padding-bottom:5px;
    }
    #displaymode {position:absolute;left:398;top:77;}
    #restrictionMessage {position:absolute;left:204;top:56;font-weight:bold;color:red;}
    #systembuttons {position:absolute;left:448;top:6;width:100;text-align:right;}
    #charts {display:<%= chartsState %>;position:relative;top:<%= charttop %>;left:0;}
    #spacer {position:absolute;top:0;height:0;}
    #stretcher {position:absolute;top:0;height:0;}
    }

    @media print {
    .results{
    background-color:#FFFFFF;
    padding-left:20px;
    padding-bottom:5px;
    padding-top:10px;
    margin-bottom : 10px;
    border-bottom: 2px solid black;
    }
    .questiontext{
    background-color:#FFFFFF;
    padding-left:5px;
    padding-bottom:5px;
    page-break-after: avoid;}
    #displaymode {position:absolute;left:398;top:77;}
    #restrictionMessage {position:absolute;left:0;top:56;font-weight:bold;color:black;}
    #systembuttons {display:none;}
    #charts {display:<%= chartsState %>;position:relative;top:0;left:0;}
    #spacer {position:relative;top:0;height:140}
    #stretcher {position:relative;top:0;height:140}
    }

    Since it is a dynamic page, with loop generated layers, this is part of the code that loops over it.

    if i=8 then apply_QStyle = " style=""page-break-before:always;""" end if
    if i=15 then apply_QStyle = " style=""page-break-before:always;""" end if
    if i=23 then apply_QStyle = " style=""page-break-before:always;""" end if
    if i=27 then apply_QStyle = " style=""page-break-before:always;""" end if

    if QtypeArray(i) = "3" and freetext = "n" then
    apply_QStyle = " style=""display:none"""
    apply_RStyle = " style=""display:none"""
    end if

    response.write"<div class=""questiontext"" " & apply_QStyle & "><b>Question " & i & "</b>: " & QuestionText(i) & "</div>"
    response.write"<div class=""results"" " & apply_RStyle & ">"

    I will send you the link at your email address so you can see the result and behaviour ...

    But for now, thank you for looking at it.

    Dirk Pauwels
    E-learning architect
    Xaurum Belux

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Thanks for the login. Nice design btw!

    However, I am quite flummoxed. I think the next step is to simplify to try to narrow the problem down. I presume the section that produces the actual list is in an include or similar? I may be worth separating that from the header first to see what we get.

    Its a process of elimination, but it may be the only way to go at the moment. I am convinced we are looking for a bug in the browser, not in your code.
    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