By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,624 Members | 2,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,624 IT Pros & Developers. It's quick & easy.

Funny interaction of float and page-break-before

P: n/a
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
http://OakRoadSystems.com/
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:
http://diveintomark.org/archives/200..._wont_help_you
Apr 27 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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
<th************@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
http://OakRoadSystems.com/
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:
http://diveintomark.org/archives/200..._wont_help_you
May 1 '07 #2

P: n/a
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="dropnumber">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
May 1 '07 #3

P: n/a
Tue, 01 May 2007 13:33:50 +0200 from John Hosking
<Jo**@DELETE.Hosking.name.INVALID>:
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="dropnumber">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:#FFFFFF none }

which was actually intentional?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
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:
http://diveintomark.org/archives/200..._wont_help_you
May 3 '07 #4

P: n/a
Stan Brown wrote:
Tue, 01 May 2007 13:33:50 +0200 from John Hosking:
>Stan Brown wrote:
>>URL: http://www.tc3.edu/instruct/sbrown/stat50/qz99_.htm
Suggestion: Slip a <pelement into Question 3's div, so:

<div class="pagesec">
<p>
<span class="dropnumber">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
May 3 '07 #5

P: n/a
Thu, 03 May 2007 14:20:21 +0200 from John Hosking
<Jo**@DELETE.Hosking.name.INVALID>:
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
http://OakRoadSystems.com/
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:
http://diveintomark.org/archives/200..._wont_help_you
May 4 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.