javascript - how to create 3 columns landscape layout -


i'm fighting 3 columns landscape layout

i print page 3 same fix columns (unfortunately height not same, pages break down 2 pages)

what in landscape is:

enter image description here

and i'm getting is:

enter image description here

i cannot position should be

can advise me solution crap please

any advice helpful, or maybe struggling problem , can give god direction please

i who's doing not in landscape few days ago , working find

i didn't find solution in web now

this starting code:

 <?php include("bd.php");  $print[] = null;  if(isset($_get['option1'])) {     $print = $_get['option1']; }  $integerids = array_map('intval', explode(',', $print)); $usersids = implode(',', $integerids); $requete = "select p.pr_id id, p.pr_nom nom, p.pr_poids poids, p.pr_ingredients ingredients, p.pr_description description, p.pr_valeurs_energetiques valeurs_energetiques, p.pr_valeurs_nutritionnelles valeurs_nutritionnelles, c.ca_nom categorie, sc.sc_nom sous_categorie, p.pr_enligne enligne produit p,categorie c,sous_categorie sc p.pr_id_categorie=c.ca_id , p.pr_id_sous_categorie=sc.sc_id , p.pr_id in ({$usersids})  order p.pr_id";  $resultat = mysql_query($requete); $num_rows = mysql_num_rows($resultat); mysql_query("set names 'utf8'");  ?>  <!doctype html> <html> <head lang="fr">     <meta charset="utf-8">     <title></title>     <link rel="stylesheet" href="css/bootstrap.min.css">     <link rel="stylesheet" href="css/bootstrap-theme.min.css">     <link type="text/css" media="print" href="css/print.css">     <script src="js/jquery-1.10.2.js"></script>     <script src="js/bootstrap.min.js"></script>     <style type="text/css" >         /* page settings */         .pagerotate         {             -webkit-transform: rotate(-90deg);             -moz-transform:rotate(-90deg);             filter:progid:dximagetransform.microsoft.basicimage(rotation=3);         }         .rowmainpage {           }         .column {             width: 63mm;             border: solid #000000 1px;             float: left;             position:relative;             padding: 0;         }         /*page items*/         .logopuricard{             width: 7em;             top: 0;             margin-left: 38%;             margin-bottom: 5px;          }         /*product image*/         .productimg {             width: 8em;             float: left         }         /*product name*/         .nom {             font-size: 20px;             font-weight: bold;             margin-left: 2em;         }         /*product weight*/         .weight {             margin-left: 4em !important;         }         /*product description*/         .productdescription {          }         /*product container of small peaces(ingrédients,valeurs énergétiques etc..) black border*/         .divsmallcontainer {             border: solid 1px #000000;             width: 100%;             /*margin-left: -1em;*/         }         /*container valor energetic*/         .valeurenergcontainer {             padding-left: 10px;         }     </style>  </head> <body class="pagerotate" onload="window.print()"> <!--container start--> <div class="container">     <?php     if($num_rows > 0) {     /*   start variables row creation; */     $startrow = true;     $postcounter = 0;      $idcheck = 0;      while($num_rows > 0){     $ligne = mysql_fetch_assoc($resultat);      if ($startrow) {         /*logo  start*/         echo  "<img class='logopuricard' src='./images/logo.jpg'>";         /*logo  end*/        /*page row start*/         echo '<div class="row rowmainpage">'; //        /*first column start*/ //        echo   '<div class="col-md-12">';         echo "<!--    test 6 kolumn        -->";         $startrow = false;     }     $postcounter += 1;     ?>     <?php     $id = $ligne["id"];     $nom = $ligne["nom"];     $poids = $ligne["poids"];     $ingredients = $ligne['ingredients'];     $description = $ligne['description'];     $valeurs_energetiques = $ligne['valeurs_energetiques'];     $valeurs_nutritionnelles = $ligne['valeurs_nutritionnelles'];     ?>      <!-- first column start   -->     <div class="col-md-4 column"  >  <!-- product img start   -->     <?php if (file_exists('../assets/produit_'.$id . ".png")) {?>         <img class="productimg" src="../assets/produit_<?php echo $id; ?>.png"  />     <?php  } ?> <!-- product img end   -->  <!-- product nom start   --> <?php if(isset($nom) && !empty($nom)){     echo "<p class='nom'>". utf8_decode($nom) ."</p><br>"; }?> <!-- product nom end   --> <!-- product weight start   --> <?php if(isset($poids) && !empty($poids)){     echo "<p class='weight'>&nbsp;&nbsp;&nbsp;environ". utf8_decode($poids) . "g"  ."</p><br>"; }?> <!-- product weight end   --> <!-- product description start   --> <?php if(isset($description) && !empty($description)){     echo "<p class='productdescription'>". utf8_decode($description)  ."</p><br>"; }?> <!-- product description end   -->  <!-- product ingredient start   --> <?php if( $ingredients){     echo"<div class='divsmallcontainer'>";     echo"<b style='text-decoration: underline;'>&nbsp;&nbsp;ingrédients :</b><br><br>";     echo "<div class='valeurenergcontainer'> $valeurs_energetiques; </div>";     echo"</div>"; }  ?>  <!-- product ingredient end   -->    <?php      if($postcounter != 3 || $postcounter != 0) {         echo '</div>'; /*end of column*/     }     if ( 3 === $postcounter ) {         echo ' </div>'; /*end of column*/         echo '</div><!-- page row end-->';         $startrow = true;         $postcounter = 0; //            echo "<span class='breakpage'></span>"; //add page break     }       --$num_rows;     }/*endwhile*/      if ($postcounter !== 0 ) {         echo '</div>';     }      }else {         echo '<div class="page-header"><h1>pas des resultat</h1></div>';         echo ' <p>desole vous n\'avez pas choisir des produits</p>';     }      if ( 3 === $postcounter || $num_rows == 0 ) {         echo '</div><!-- end of internal row -->';         $startrow = true;         $postcounter = 0;     }  ?>   <!--container end--> </div> </body> </html> 

there's no need rotate page, - rotate everything. put css want landscape print layout under @media print{@page {size: landscape}} media query.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -