Funny interaction of float and page-break-before

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stan Brown

    Funny interaction of float and page-break-before

    URL: http://www.tc3.edu/instruct/sbrown/stat50/qz99_.htm
    CSS: http://www.tc3.edu/instruct/sbrown/print.css (for print)

    IE6 and Mozilla both do what I want on screen, but IE is acting odd
    in print. Questions 3 and 4 are styled with identical floats,
    padding, etc., but for some reason IE indents the "3" of question 3.
    The only difference I'm seeing is that one is styled with page-break-
    before:always and the other with margin-top:2em.

    I have a 4.01 Strict DTD. Can you tell me what I'm doing wrong, or is
    this just an IE bug?

    (General suggestions for improvement are also welcome, of course.)

    --
    Stan Brown, Oak Road Systems, Tompkins County, New York, USA
    Dragon222 adalah situs slot gacor terbaru yang selalu memberikan banyak bonus menarik dan kemenangan JP untuk pemain setia selama bermain di link slot DRAGON222.

    HTML 4.01 spec: http://www.w3.org/TR/html401/
    validator: http://validator.w3.org/
    CSS 2.1 spec: http://www.w3.org/TR/CSS21/
    validator: http://jigsaw.w3.org/css-validator/
    Why We Won't Help You:

  • Stan Brown

    #2
    Re: Funny interaction of float and page-break-before (repost)

    This question can't be all that hard for an expert, and I did give a
    URL rather than code snippets. Maybe the first copy never went out?

    Fri, 27 Apr 2007 07:57:42 -0400 from Stan Brown
    <the_stan_brown @fastmail.fm>:
    URL: http://www.tc3.edu/instruct/sbrown/stat50/qz99_.htm
    CSS: http://www.tc3.edu/instruct/sbrown/print.css (for print)
    >
    IE6 and Mozilla both do what I want on screen, but IE is acting odd
    in print. Questions 3 and 4 are styled with identical floats,
    padding, etc., but for some reason IE indents the "3" of question 3.
    The only difference I'm seeing is that one is styled with page-break-
    before:always and the other with margin-top:2em.
    >
    I have a 4.01 Strict DTD. Can you tell me what I'm doing wrong, or is
    this just an IE bug?
    >
    (General suggestions for improvement are also welcome, of course.)

    --
    Stan Brown, Oak Road Systems, Tompkins County, New York, USA
    Dragon222 adalah situs slot gacor terbaru yang selalu memberikan banyak bonus menarik dan kemenangan JP untuk pemain setia selama bermain di link slot DRAGON222.

    HTML 4.01 spec: http://www.w3.org/TR/html401/
    validator: http://validator.w3.org/
    CSS 2.1 spec: http://www.w3.org/TR/CSS21/
    validator: http://jigsaw.w3.org/css-validator/
    Why We Won't Help You:

    Comment

    • John Hosking

      #3
      Re: Funny interaction of float and page-break-before

      Stan Brown wrote:
      URL: http://www.tc3.edu/instruct/sbrown/stat50/qz99_.htm
      CSS: http://www.tc3.edu/instruct/sbrown/print.css (for print)
      >
      IE6 and Mozilla both do what I want on screen, but IE is acting odd
      in print. Questions 3 and 4 are styled with identical floats,
      padding, etc., but for some reason IE indents the "3" of question 3.
      The only difference I'm seeing is that one is styled with page-break-
      before:always and the other with margin-top:2em.
      >
      I have a 4.01 Strict DTD. Can you tell me what I'm doing wrong, or is
      this just an IE bug?
      Suggestion: Slip a <pelement into Question 3's div, so:

      <div class="pagesec" >
      <p>
      <span class="dropnumb er">3</span>

      and see what you think. Explanation? None, except it seemed to help in
      my tests (IE6 only). You can look at http://www.csscreator.com/node/2899
      if you want, but it might only confuse you, as I'm not convinced that it
      applies to your case.

      BTW, I also got your Question 2 to exhibit the problem when I removed
      the right-floated table preceding the dropnumber. "But," you say, "I've
      already got a <pon Q2!" Yes, well. The problem went away when I
      removed the class from the <pyou've already got there. <shrug>
      >
      (General suggestions for improvement are also welcome, of course.)
      Your CSS has a couple of stray commas in it.

      HTH.
      --
      John

      Comment

      • Stan Brown

        #4
        Re: Funny interaction of float and page-break-before

        Tue, 01 May 2007 13:33:50 +0200 from John Hosking
        <John@DELETE.Ho sking.name.INVA LID>:
        Stan Brown wrote:
        URL: http://www.tc3.edu/instruct/sbrown/stat50/qz99_.htm
        CSS: http://www.tc3.edu/instruct/sbrown/print.css (for print)

        Questions 3 and 4 are styled with identical floats,
        padding, etc., but for some reason IE indents the "3" of question 3.
        The only difference I'm seeing is that one is styled with page-break-
        before:always and the other with margin-top:2em.
        >
        Suggestion: Slip a <pelement into Question 3's div, so:
        >
        <div class="pagesec" >
        <p>
        <span class="dropnumb er">3</span>
        >
        and see what you think. Explanation? None, except it seemed to help in
        my tests (IE6 only). You can look at http://www.csscreator.com/node/2899
        if you want, but it might only confuse you, as I'm not convinced that it
        applies to your case.
        >
        BTW, I also got your Question 2 to exhibit the problem when I removed
        the right-floated table preceding the dropnumber. "But," you say, "I've
        already got a <pon Q2!" Yes, well. The problem went away when I
        removed the class from the <pyou've already got there. <shrug>
        <shrugindeed. :-) Thanks for doing the experimentation .

        (General suggestions for improvement are also welcome, of course.)
        >
        Your CSS has a couple of stray commas in it.
        Thanks. I did validate it a while ago, but didn't bother after making
        one or more small changes. I should have bothered. :-)

        But you said "a couple of stray commas". The validator at Jigsaw
        found only one, on line 69. When I fixed that it foud no more errors.
        Do you remember where the others were? Or were you looking at things
        like

        dfn, .key {
        font-weight:bold;
        color:#008; background:#FFF FFF none }

        which was actually intentional?

        --
        Stan Brown, Oak Road Systems, Tompkins County, New York, USA
        Dragon222 adalah situs slot gacor terbaru yang selalu memberikan banyak bonus menarik dan kemenangan JP untuk pemain setia selama bermain di link slot DRAGON222.

        HTML 4.01 spec: http://www.w3.org/TR/html401/
        validator: http://validator.w3.org/
        CSS 2.1 spec: http://www.w3.org/TR/CSS21/
        validator: http://jigsaw.w3.org/css-validator/
        Why We Won't Help You:

        Comment

        • John Hosking

          #5
          Re: Funny interaction of float and page-break-before

          Stan Brown wrote:
          Tue, 01 May 2007 13:33:50 +0200 from John Hosking:
          >Stan Brown wrote:>Suggestion: Slip a <pelement into Question 3's div, so:
          >>
          ><div class="pagesec" >
          > <p>
          > <span class="dropnumb er">3</span>
          >>
          >and see what you think. Explanation? None, except it seemed to help in
          >my tests (IE6 only). You can look at http://www.csscreator.com/node/2899
          >if you want, but it might only confuse you, as I'm not convinced that it
          >applies to your case.
          >>
          >BTW, I also got your Question 2 to exhibit the problem when I removed
          >the right-floated table preceding the dropnumber. "But," you say, "I've
          >already got a <pon Q2!" Yes, well. The problem went away when I
          >removed the class from the <pyou've already got there. <shrug>
          >
          <shrugindeed. :-) Thanks for doing the experimentation .
          I guess this means you didn't see the positive results when you tried
          these things?
          But you said "a couple of stray commas". The validator at Jigsaw
          found only one, on line 69. When I fixed that it foud no more errors.
          Do you remember where the others were?
          Apparently a mistake on my part. I thought I found a ".cmd," in both the
          screen and print versions of the CSS. Bad mushrooms, maybe?

          --
          John

          Comment

          • Stan Brown

            #6
            Re: Funny interaction of float and page-break-before

            Thu, 03 May 2007 14:20:21 +0200 from John Hosking
            <John@DELETE.Ho sking.name.INVA LID>:
            Stan Brown wrote:
            <shrugindeed. :-) Thanks for doing the experimentation .
            >
            I guess this means you didn't see the positive results when you tried
            these things?
            My <shrugmeant, roughly, "well, I don't understand why doing the
            same thing should produce two different behaviors." I thought your
            <shrugmeant the same.

            I appreciate the experimentation . But not knowing what's wrong, I
            don't know how to fix it. Or rather, I *do* know how to fix it on
            this document but not on the next one. I grind out a quiz a week, so
            I need a paradigm that works reliably. If it's an IE6 bug, as it
            appears to be, then I just shrug my shoulders and say "too bad; I
            refuse to code around IE bugs as long as the content is still
            readable.)
            But you said "a couple of stray commas". The validator at Jigsaw
            found only one, on line 69. When I fixed that it foud no more errors.
            Do you remember where the others were?
            >
            Apparently a mistake on my part. I thought I found a ".cmd," in both the
            screen and print versions of the CSS. Bad mushrooms, maybe?
            That was the one on line 69 that the validator found. You said "a
            couple of stray commas", so I was asking for guidance on where the
            other one(s) were located.

            Anyway, your comment prodded me to re-validate my CSS, which is a
            good thing.

            --
            Stan Brown, Oak Road Systems, Tompkins County, New York, USA
            Dragon222 adalah situs slot gacor terbaru yang selalu memberikan banyak bonus menarik dan kemenangan JP untuk pemain setia selama bermain di link slot DRAGON222.

            HTML 4.01 spec: http://www.w3.org/TR/html401/
            validator: http://validator.w3.org/
            CSS 2.1 spec: http://www.w3.org/TR/CSS21/
            validator: http://jigsaw.w3.org/css-validator/
            Why We Won't Help You:

            Comment

            Working...