views:

357

answers:

3

hi all

I have alot of divs on a page with variable amounts of content in them. I am trying to use page-break-inside: avoid; so that each div section is not broken over 2 pages.

It is working in firefox but not IE8.

I have this in my css print file .page-break-inside-avoid {page-break-inside: avoid;}

and my divs have the class in like

IE8 is suppost to support this now. isnt it ?

Am i doing somethin wrong ? Anyone solved this issue ? or had any experience with it ?

any help would be great.

thanks alot richard

+1  A: 

"The page-break-inside property is only supported by Opera."

Grumdrig
Hi Grumdrig This page says it does support it-- http://msdn.microsoft.com/en-us/library/cc196971(VS.85).aspx
richard moss
also this link says it is supported in ie8 http://msdn.microsoft.com/en-us/library/dd433064(VS.85).aspx
richard moss
+2  A: 

Webdevout.net is a great place to check browser CSS compatibility.

For page-break-inside only IE8 and Opera 8+ are shown to support it

Gareth
any ideas why its not working in IE8 then ? thanks
richard moss
I've found that page-break-inside will *only* work in IE8 when your pages are interpreted in **standards compliance mode**, as opposed to quirks mode. So, make sure you have a valid doctype! See http://www.quirksmode.org/css/quirksmode.html
Chris W. Rea
A: 

Without seeing the code I can only guess it is maybe something to do with the height or nesting of the divs you're trying to apply it to. Could even be the width as remember both Print Previews in IE and FF will have different viewport dimensions (from the normal browser viewport and each other), a few pixels out could completely change the display of it

Alex