javascript - Page break on print issue -


i have problem on print, data scrolling horizontally, (which results in cutting content on print).

i.e

0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7 8 9

i want break page, after 5 elements, overflowing horizontally.. like

0 1 2 3 4

0 1 2 3 4

0 1 2 3 4

5 6 7 8 9

5 6 7 8 9

5 6 7 8 9

but idea result difinitely be,

0 1 2 3 4

5 6 7 8 9

0 1 2 3 4

5 6 7 8 9

0 1 2 3 4

5 6 7 8 9

any idea...?

because content dynamic , vary situation, can't start untill have clear idea,

men have soluttion...

    <html>         <head>             <title></title>             <meta http-equiv="content-type" content="text/html; charset=utf-8">             <script>  //method     var table="<datalist><p>";     var lines=3;//number of lines want             var = 0,aux=lines;             lines=lines*2;             {                 if(lines>aux){table=table+"<span>"+i+"</span>";if(i==4){lines--;table=table+"</p><p>";}if(lines>aux && i==4){i=-1;}}                 i++;                 if(lines!=0 && lines<=aux){table=table+"<span>"+i+"</span>";if(i==9){lines--;i=4;table=table+"</p><p>";}}             } while (lines>0);             table=table+"</datalist>"; //method  //here print table              document.writeln(table);             </script>              <style>                 datalist {                     font-size:14px; overflow: auto;display:block;                  }                 datalist span{                      padding:2px 5px; border:1px solid #000;                 }             </style>         </head>         <body>            </body>     </html> 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -