force page break between absolutely positioned elements in css - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Absolute Position

Description

force page break between absolutely positioned elements in css

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.break {<!-- ww  w  . j av  a 2  s.c  o m-->
   page-break-after:always;
   position:relative;
}

.absolute {
   position:absolute;
}
</style> 
 </head> 
 <body> 
  <div class="break"> 
   <div class="absolute" style="top:11.58cm;">
     Lorem i 
   </div> 
  </div> 
  <div class="break"> 
   <div class="absolute" style="top:13.35cm;">
     Lorem i 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials