diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php
index 065f2814f057a344e9b3074f456f4d36f16075e1..f571af9873eefc8722e6978ad41e316da26ac055 100644
--- a/dev/skeletons/skeleton_list.php
+++ b/dev/skeletons/skeleton_list.php
@@ -333,6 +333,7 @@ if (! empty($moreforfilter))
 $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
 $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 
+print '<div class="div-table-responsive">';
 print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 
 // Fields title
@@ -535,6 +536,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters);    // N
 print $hookmanager->resPrint;
 
 print '</table>'."\n";
+print '</div>'."\n";
 
 print '</form>'."\n";
 
diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php
index ef125ecbbccf0312d874d35d5b1aac89a367a77f..b133e505d5cb14a4c2d476e5a515d337298adf95 100644
--- a/htdocs/accountancy/customer/lines.php
+++ b/htdocs/accountancy/customer/lines.php
@@ -123,6 +123,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
 	$account_parent = '';   // Protection to avoid to mass apply it a second time
 }
 
+
 /*
  * View
  */
@@ -252,6 +253,7 @@ if ($result) {
 
 	$moreforfilter = '';
 	
+    print '<div class="div-table-responsive">';
 	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 	
 	print '<tr class="liste_titre">';
@@ -338,18 +340,19 @@ if ($result) {
 		print "</tr>";
 		$i ++;
 	}
+	
+	print "</table>";
+	print "</div>";
+	
+    if ($nbtotalofrecords > $limit) {
+        print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
+    }
+    
+    print '</form>';
 } else {
-	print $db->error();
+	print $db->lasterror();
 }
 
-print "</table>";
-
-if ($nbtotalofrecords > $limit) {
-    print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
-}
-
-print '</form>';
-
 
 llxFooter();
 $db->close();
diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index 8d759de5e01e1af45028c6c4c5304d29de08a674..83a01abadc36825a94966a78927e47ae92ff606c 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -264,6 +264,7 @@ if ($result) {
 	
 	$moreforfilter = '';
 	
+    print '<div class="div-table-responsive">';
 	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 	print '<tr class="liste_titre">';
 	print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
@@ -400,8 +401,9 @@ if ($result) {
 		print '</tr>';
 		$i ++;
 	}
-
 	print '</table>';
+	print "</div>";
+	
 	print '</form>';
 } else {
 	print $db->error();
diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php
index 29a8b167b87eaae3294448f642edce4f3e5f33ec..5ac3f5b7a011f06b4ed4a1f16ed377b7280643c5 100644
--- a/htdocs/accountancy/expensereport/lines.php
+++ b/htdocs/accountancy/expensereport/lines.php
@@ -230,6 +230,7 @@ if ($result) {
 
 	$moreforfilter = '';
 
+    print '<div class="div-table-responsive">';
 	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 
 	print '<tr class="liste_titre">';
@@ -304,18 +305,19 @@ if ($result) {
 		print "</tr>";
 		$i ++;
 	}
+	
+	print "</table>";
+	print "</div>";
+	
+	if ($nbtotalofrecords > $limit) {
+	    print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
+	}
+	
+	print '</form>';
 } else {
 	print $db->error();
 }
 
-print "</table>";
-
-if ($nbtotalofrecords > $limit) {
-    print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
-}
-
-print '</form>';
-
 
 llxFooter();
 $db->close();
diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php
index d583ec38d42aff579bb52e52b3c5472de25ac635..0d058ffc4022460310cf079ce47e71695bba0a8d 100644
--- a/htdocs/accountancy/expensereport/list.php
+++ b/htdocs/accountancy/expensereport/list.php
@@ -257,6 +257,7 @@ if ($result) {
 
 	$moreforfilter = '';
 
+    print '<div class="div-table-responsive">';
 	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 	print '<tr class="liste_titre">';
 	print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
@@ -352,6 +353,8 @@ if ($result) {
 	}
 
 	print '</table>';
+	print "</div>";
+	
 	print '</form>';
 } else {
 	print $db->error();
diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php
index a2cdc7b42ccfe2a6cbe1850a878dc65deffea246..41d62a60f2225cc2ed550a5945be21b034d3b141 100644
--- a/htdocs/accountancy/supplier/lines.php
+++ b/htdocs/accountancy/supplier/lines.php
@@ -236,6 +236,7 @@ if ($result) {
 	
 	$moreforfilter = '';
 	
+    print '<div class="div-table-responsive">';
 	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 	
 	print '<tr class="liste_titre">';
@@ -324,17 +325,18 @@ if ($result) {
 		print "</tr>";
 		$i ++;
 	}
+    print "</table>";
+    print "</div>";
+    
+    if ($nbtotalofrecords > $limit) {
+        print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
+    }
+    
+    print '</form>';
 } else {
 	print $db->error();
 }
 
-print "</table>";
-
-if ($nbtotalofrecords > $limit) {
-    print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
-}
-
-print '</form>';
 
 
 llxFooter();
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index d5fcf2d011bf202e9909f75c1f07569ba81aac69..2bbc150428b51eeb81eedde694b6e913bac84af9 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -266,7 +266,8 @@ if ($result) {
 	
 	$moreforfilter = '';
 	
-    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
+    print '<div class="div-table-responsive">';
+	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 	print '<tr class="liste_titre">';
 	print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
 	print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
@@ -414,6 +415,8 @@ if ($result) {
 	}
 
 	print '</table>';
+	print "</div>";
+	
 	print '</form>';
 } else {
 	print $db->error();
diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php
index 0727002aa59087806a51c6219a321e271a5e8139..33925e8d13098c21cc260f90d833145498146496 100644
--- a/htdocs/adherents/list.php
+++ b/htdocs/adherents/list.php
@@ -375,6 +375,7 @@ if (! empty($moreforfilter))
 $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
 $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 
+print '<div class="div-table-responsive">';
 print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 print '<tr class="liste_titre">';
 if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
@@ -842,6 +843,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters);    // N
 print $hookmanager->resPrint;
 
 print "</table>\n";
+print "</div>";
 print '</form>';
 
 if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit, 1);
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index 7e75991760469892f239396e1f8ac6331662b427..bd52652d9c5d1a0245886f64f6241e1ae88298a5 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -556,6 +556,7 @@ if ($resql)
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 	
+    print '<div class="div-table-responsive">';
 	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 	
 	// Fields title
@@ -1003,6 +1004,7 @@ if ($resql)
 	print $hookmanager->resPrint;
 				
 	print '</table>'."\n";
+    print '</div>'."\n";
 
 	print '</form>'."\n";
 	
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 87a950623238ce3d2259de3b24adc6c0b6a02a54..2fd7b4822ef653d3275aaf30f09e2f135daaceac 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -845,7 +845,8 @@ if ($resql)
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 	
-	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
+    print '<div class="div-table-responsive">';
+    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 
 	// Fields title
 	print '<tr class="liste_titre">';
@@ -1421,9 +1422,8 @@ if ($resql)
 	print $hookmanager->resPrint;
 				
 	print '</table>'."\n";
-
-	print '<br />';
-
+	print '</div>';
+	
 	print '</form>'."\n";
 
 	//print '<br>'.img_help(1,'').' '.$langs->trans("ToBillSeveralOrderSelectCustomer", $langs->transnoentitiesnoconv("CreateInvoiceForThisCustomer")).'<br>';
diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php
index 8141c906c8ef792bae197070389b55850214cf6c..dc5f2d5fad08a717c5a8b08342a32715544c4f2f 100644
--- a/htdocs/compta/bank/bankentries.php
+++ b/htdocs/compta/bank/bankentries.php
@@ -757,7 +757,8 @@ if ($resql)
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 	
-	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
+    print '<div class="div-table-responsive">';
+    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 	
 	// Fields title
 	print '<tr class="liste_titre">';
@@ -1295,6 +1296,8 @@ if ($resql)
 	}
 
 	print "</table>";
+	print "</div>";
+	
     print '</form>';
 	$db->free($resql);
 }
diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php
index ca1b2cfdaa15a7ecd02c08a9dd9695802c9f3608..51cb5c636fd8311b405e8a22c115a9045cd8e53b 100644
--- a/htdocs/compta/bank/index.php
+++ b/htdocs/compta/bank/index.php
@@ -276,6 +276,7 @@ if (! empty($moreforfilter))
 $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
 $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 
+print '<div class="div-table-responsive">';
 print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 
 // Fields title
@@ -583,6 +584,9 @@ if (isset($totalarray['totalbalancefield']))
 }
 
 print '</table>';
+print "</div>";
+
+print "</form>";
 
 
 /*
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index c38c8060bd7c2419d3de61e4adf50b77668e28d6..ea012cb3672e01fc23991a7575ad41907767e9a1 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -636,7 +636,8 @@ if ($resql)
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 
-	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
+    print '<div class="div-table-responsive">';
+    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 
     print '<tr class="liste_titre">';
     if (! empty($arrayfields['f.facnumber']['checked']))          print_liste_field_titre($arrayfields['f.facnumber']['label'],$_SERVER['PHP_SELF'],'f.facnumber','',$param,'',$sortfield,$sortorder);
@@ -1135,6 +1136,7 @@ if ($resql)
 	print $hookmanager->resPrint;
     
 	print "</table>\n";
+    print "</div>";
     
     print "</form>\n";
     
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index c003b638748eee14c05a7b4c65177b7438d3c187..e0f465b5389f2cc5f9dc6da3177f0e6701a673a2 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -393,7 +393,8 @@ if ($resql)
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 	
-	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
+    print '<div class="div-table-responsive">';
+    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
     print '<tr class="liste_titre">';
     if (! empty($arrayfields['c.ref']['checked']))               print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder);
     if (! empty($arrayfields['c.ref_customer']['checked']))      print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder);
@@ -723,6 +724,8 @@ if ($resql)
     $db->free($resql);
 
     print '</table>';
+    print '</div>';
+    
     print '</form>';
 }
 else
diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php
index 836e2fd82f6fbc02a9197ab84f1eceb31e124cf2..e4a18e1599aafd021b18bee52de0fe9318d9effe 100644
--- a/htdocs/contrat/services.php
+++ b/htdocs/contrat/services.php
@@ -271,6 +271,7 @@ if ($resql)
 	$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
 	$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 	
+    print '<div class="div-table-responsive">';
 	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 	
 	print '<tr class="liste_titre">';
@@ -449,7 +450,10 @@ if ($resql)
 	}
 	$db->free($resql);
 
-	print '</table></form>';
+	print '</table>';
+	print '</div>';
+	
+	print '</form>';
 
 }
 else
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 28b9517fe0bace0c122398cef06624e912344cb2..dadc470e273a7c331d47716e9df05bb29a6a53b0 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -549,6 +549,7 @@ class FormFile
             $buttonlabeltoshow=$buttonlabel;
             if (empty($buttonlabel)) $buttonlabel=$langs->trans('Generate');
 
+            if ($conf->browser->layout == 'phone') $urlsource.='#'.$forname.'_form';   # So we switch to form after a generation
             if (empty($noform)) $out.= '<form action="'.$urlsource.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc').'" name="'.$forname.'" id="'.$forname.'_form" method="post">';
             $out.= '<input type="hidden" name="action" value="builddoc">';
             $out.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index dd1f0b6e703e275845afd35948add6d448acdd47..8a093820f4cbe81323e8ae1833fe389d2df1e75e 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -305,7 +305,8 @@ if ($resql)
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 	
-	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
+    print '<div class="div-table-responsive">';
+    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 
 	print '<tr class="liste_titre">';
 
@@ -635,6 +636,8 @@ if ($resql)
 	}
 
 	print "</table>";
+	print "</div>";
+	print '</form>';
 	$db->free($resql);
 }
 else
diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php
index ab9f318ca8957b543c01f04be0d84f230ed9ef3f..6f71bd77ce6d2f2fc97472d08061c703793da2e5 100644
--- a/htdocs/expensereport/list.php
+++ b/htdocs/expensereport/list.php
@@ -352,6 +352,7 @@ if ($resql)
 	$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
 	$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 	
+    print '<div class="div-table-responsive">';
 	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 	print "<tr class=\"liste_titre\">";
 	if (! empty($arrayfields['d.ref']['checked']))                  print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.ref","",$param,'',$sortfield,$sortorder);
@@ -664,7 +665,8 @@ if ($resql)
 	print $hookmanager->resPrint;
 	
 	print '</table>'."\n";
-
+    print '</div>';
+    
 	print '</form>'."\n";
 	
 	/*
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index cc2a5b83c6d65ec016aa51297735699676517b7d..f943fa4784bc0458d647bba5d21312f865c95b16 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1241,16 +1241,6 @@ else if ($id > 0 || ! empty($ref))
     
     print '<table class="border" width="100%">';
     
-	// Ref
-	/*
-	print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="3">';
-	print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
-	print '</td></tr>';
-
-	// Third party
-	print "<tr><td>".$langs->trans("Company").'</td><td colspan="3">'.$object->thirdparty->getNomUrl(1)."</td></tr>";
-    */
-    
 	if (! empty($conf->global->FICHINTER_USE_PLANNED_AND_DONE_DATES))
 	{
 		// Date Start
@@ -1283,37 +1273,6 @@ else if ($id > 0 || ! empty($ref))
 	print '</td>';
 	print '</tr>';
 
-	// Project
-	/*
-	if (! empty($conf->projet->enabled))
-	{
-		$langs->load('projects');
-		print '<tr>';
-		print '<td>';
-
-		print '<table class="nobordernopadding" width="100%"><tr><td>';
-		print $langs->trans('Project');
-		print '</td>';
-		if ($action != 'classify')
-		{
-			print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&amp;id='.$object->id.'">';
-			print img_edit($langs->trans('SetProject'),1);
-			print '</a></td>';
-		}
-		print '</tr></table>';
-		print '</td><td colspan="3">';
-		if ($action == 'classify')
-		{
-			$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid', 0, 0, 1);
-		}
-		else
-		{
-			$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none', 0, 0);
-		}
-		print '</td>';
-		print '</tr>';
-	}*/
-
 	// Contrat
 	if ($conf->contrat->enabled)
 	{
@@ -1355,9 +1314,6 @@ else if ($id > 0 || ! empty($ref))
 		print '</tr>';
 	}
 
-	// Statut
-	//print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">'.$object->getLibStatut(4).'</td></tr>';
-
     // Other attributes
     $cols = 2;
     include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index 843e8984a6842facfe559ca61d8da86d64713a66..e9d8499364e706db6def7abc4de68de0382810b6 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -489,7 +489,8 @@ if ($resql)
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 
-	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
+    print '<div class="div-table-responsive">';
+    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 
 	print '<tr class="liste_titre">';
 	if (! empty($arrayfields['cf.ref']['checked']))            print_liste_field_titre($arrayfields['cf.ref']['label'],$_SERVER["PHP_SELF"],"cf.ref","",$param,'',$sortfield,$sortorder);
@@ -919,6 +920,7 @@ if ($resql)
 		$i++;
 	}
 	print "</table>\n";
+	print '</div>';
 	print "</form>\n";
 
 	if (! empty($conf->facture->enable)) print '<br>'.img_help(1,'').' '.$langs->trans("ToBillSeveralOrderSelectCustomer", $langs->transnoentitiesnoconv("CreateInvoiceForThisCustomer")).'<br>';
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index ebe65f6212244a7fcf5f55653e0f34aac57e2803..2ebdb7fe7bb44f7beedbf16379b3c5c549a7ae27 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -486,7 +486,8 @@ if ($resql)
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 	
-	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
+    print '<div class="div-table-responsive">';
+    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 	print '<tr class="liste_titre">';
 	if (! empty($arrayfields['f.ref']['checked']))                print_liste_field_titre($arrayfields['f.ref']['label'],$_SERVER['PHP_SELF'],'f.ref,f.rowid','',$param,'',$sortfield,$sortorder);
 	if (! empty($arrayfields['f.ref_supplier']['checked']))       print_liste_field_titre($arrayfields['f.ref_supplier']['label'],$_SERVER["PHP_SELF"],'f.ref_supplier','',$param,'',$sortfield,$sortorder);
@@ -984,7 +985,7 @@ if ($resql)
 	print $hookmanager->resPrint;
 	
 	print "</table>\n";
-
+    print '</div>';
 	print "</form>\n";
 }
 else
diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php
index b193e553b6157327f80fc04c82de3d5ceeeb546c..036f56acc2eb4b5ef4a4d2d07bfce1929d9bc8e2 100644
--- a/htdocs/product/reassort.php
+++ b/htdocs/product/reassort.php
@@ -261,6 +261,7 @@ if ($resql)
 	$colspan_warehouse = 1;
 	if (! empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) { $colspan_warehouse = $nb_warehouse > 1 ? $nb_warehouse+1 : 1; }
 	
+    print '<div class="div-table-responsive">';
 	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
 	
 	// Lignes des titres
@@ -381,6 +382,7 @@ if ($resql)
 	}
 
 	print "</table>";
+	print '</div>';
 	print '</form>';
 
 	if ($num > $conf->liste_limit)
diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php
index c9619124389d2a5c98708fbc25ce74e2b9501970..e4ffad6cb5287de5353ec9cb6af01b5332e97af4 100644
--- a/htdocs/product/reassortlot.php
+++ b/htdocs/product/reassortlot.php
@@ -249,7 +249,8 @@ if ($resql)
 	/*if ($eatby)		$param.="&eatby=".$eatby;
 	if ($sellby)	$param.="&sellby=".$sellby;*/
 
-    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
+    print '<div class="div-table-responsive">';
+	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
 	
 	// Lignes des titres
 	print "<tr class=\"liste_titre\">";
@@ -381,6 +382,7 @@ if ($resql)
 	}
 
 	print "</table>";
+	print '</div>';
 	print '</form>';
 
 	if ($num > $conf->liste_limit)
diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php
index f9b9d14d794551c8e071e7202fcf0dff5f186b59..192017af2a52dba1f4420855ef09c911c7abc773 100644
--- a/htdocs/product/stats/commande.php
+++ b/htdocs/product/stats/commande.php
@@ -193,7 +193,8 @@ if ($id > 0 || ! empty($ref))
 				print '</div>';
 
 				$i = 0;
-	            print '<table class="tagtable liste listwithfilterbefore" width="100%">';
+                print '<div class="div-table-responsive">';
+				print '<table class="tagtable liste listwithfilterbefore" width="100%">';
 				print '<tr class="liste_titre">';
 				print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","",$option,'',$sortfield,$sortorder);
 				print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$option,'',$sortfield,$sortorder);
@@ -243,8 +244,8 @@ if ($id > 0 || ! empty($ref))
                 print '<td align="right">'.price($total_ht).'</td>';
                 print '<td></td>';
                 print "</table>";
+                print "</div>";
                 print '</form>';
-                print '<br>';
             } else {
 				dol_print_error($db);
 			}
diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php
index 4bdfdcc5c8117ad64b10626dd8faa407fd73627b..bed3be1892f4d4393b54e0d88a1579ec8ae5995e 100644
--- a/htdocs/product/stats/commande_fournisseur.php
+++ b/htdocs/product/stats/commande_fournisseur.php
@@ -72,6 +72,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) {
 	$search_year = '';
 }
 
+
 /*
  * View
  */
@@ -203,6 +204,7 @@ if ($id > 0 || ! empty($ref)) {
 				print '</div>';
 
 				$i = 0;
+                print '<div class="div-table-responsive">';
 				print '<table class="tagtable liste listwithfilterbefore" width="100%">';
 				print '<tr class="liste_titre">';
 				print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid", "", $option, '', $sortfield, $sortorder);
@@ -251,8 +253,8 @@ if ($id > 0 || ! empty($ref)) {
 				print '<td align="right">' . price($total_ht) . '</td>';
 				print '<td></td>';
 				print "</table>";
+				print '</div>';
 				print '</form>';
-				print '<br>';
 			} else {
 				dol_print_error($db);
 			}
diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php
index 34b38a7bbec97653affb84c9952ce6a1345fb56e..8c5f1a3ba867b8294f3607bf4f1a732c09005920 100644
--- a/htdocs/product/stats/contrat.php
+++ b/htdocs/product/stats/contrat.php
@@ -135,10 +135,27 @@ if ($id > 0 || ! empty($ref))
 		if ($result)
 		{
 			$num = $db->num_rows($result);
-
+            if (! empty($id))
+                $option .= '&amp;id=' . $product->id;
+            if (! empty($search_month))
+                $option .= '&amp;search_month=' . $search_month;
+            if (! empty($search_year))
+                $option .= '&amp;search_year=' . $search_year;
+            
+            print '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?id=' . $product->id . '" name="search_form">' . "\n";
+            if (! empty($sortfield))
+                print '<input type="hidden" name="sortfield" value="' . $sortfield . '"/>';
+            if (! empty($sortorder))
+                print '<input type="hidden" name="sortorder" value="' . $sortorder . '"/>';
+            if (! empty($page)) {
+                print '<input type="hidden" name="page" value="' . $page . '"/>';
+                $option .= '&amp;page=' . $page;
+            }
+			                    
 			print_barre_liste($langs->trans("Contrats"),$page,$_SERVER["PHP_SELF"],"&amp;id=$product->id",$sortfield,$sortorder,'',$num,0,'');
 
 			$i = 0;
+            print '<div class="div-table-responsive">';
 			print '<table class="tagtable liste listwithfilterbefore" width="100%">';
 
 			print '<tr class="liste_titre">';
@@ -180,13 +197,15 @@ if ($id > 0 || ! empty($ref))
 					$i++;
 				}
 			}
+			
+			print '</table>';
+			print '</div>';
+			print '</form>';
 		}
 		else
 		{
 			dol_print_error($db);
 		}
-		print "</table>";
-		print '<br>';
 		$db->free($result);
 	}
 }
diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php
index e9eb3d41859c0bb4e3ffcdf72be09e52afc172bd..53e5b0ab0a63e42b6d2998235f919f79403f23e9 100644
--- a/htdocs/product/stats/facture.php
+++ b/htdocs/product/stats/facture.php
@@ -216,6 +216,7 @@ if ($id > 0 || ! empty($ref))
 				print '</div>';
 
                 $i = 0;
+                print '<div class="div-table-responsive">';
                 print '<table class="tagtable liste listwithfilterbefore" width="100%">';
                 print '<tr class="liste_titre">';
                 print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","",$option,'',$sortfield,$sortorder);
@@ -265,8 +266,8 @@ if ($id > 0 || ! empty($ref))
                 print '<td align="right">'.price($total_ht).'</td>';
                 print '<td></td>';
                 print "</table>";
+                print '</div>';
                 print '</form>';
-                print '<br>';
             } else {
                 dol_print_error($db);
             }
diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php
index 77bd4b73887cb7960396f85ff0d3d7a5d970259b..6fe189c770085b1687e68bc8367a2f6cf1527d55 100644
--- a/htdocs/product/stats/facture_fournisseur.php
+++ b/htdocs/product/stats/facture_fournisseur.php
@@ -195,6 +195,7 @@ if ($id > 0 || ! empty($ref))
 				print '</div>';
 
 				$i = 0;
+                print '<div class="div-table-responsive">';
 				print '<table class="tagtable liste listwithfilterbefore" width="100%">';
 				print '<tr class="liste_titre">';
 				print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "s.rowid", "", $option, '', $sortfield, $sortorder);
@@ -244,8 +245,8 @@ if ($id > 0 || ! empty($ref))
 				print '<td align="right">' . price($total_ht) . '</td>';
 				print '<td></td>';
 				print "</table>";
+				print '</div>';
 				print '</form>';
-				print '<br>';
 			} else {
 				dol_print_error($db);
 			}
diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php
index d23853c174fc022a639676bf047cbe1efc508456..289cf3d3578955aeac5c44db44a4e258b1027a14 100644
--- a/htdocs/product/stats/propal.php
+++ b/htdocs/product/stats/propal.php
@@ -197,6 +197,7 @@ if ($id > 0 || ! empty($ref))
 				print '</div>';
 
 				$i = 0;
+                print '<div class="div-table-responsive">';
 				print '<table class="tagtable liste listwithfilterbefore" width="100%">';
 				print '<tr class="liste_titre">';
 				print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.rowid", "", $option, '', $sortfield, $sortorder);
@@ -238,19 +239,20 @@ if ($id > 0 || ! empty($ref))
 						}
 					}
 				}
-			print '<tr class="liste_total">';
-			print '<td>' . $langs->trans('Total') . '</td>';
-			print '<td colspan="2"></td>';
-			print '<td align="center">' . $total_qty . '</td>';
-			print '<td align="right">' . price($total_ht) . '</td>';
-			print '<td></td>';
-			print "</table>";
-			print '</form>';
-			print '<br>';
-		} else {
-			dol_print_error($db);
-		}
-		$db->free($result);
+				
+        		print '<tr class="liste_total">';
+        		print '<td>' . $langs->trans('Total') . '</td>';
+        		print '<td colspan="2"></td>';
+        		print '<td align="center">' . $total_qty . '</td>';
+        		print '<td align="right">' . price($total_ht) . '</td>';
+        		print '<td></td>';
+        		print "</table>";
+        		print '</div>';
+        		print '</form>';
+    		} else {
+    			dol_print_error($db);
+    		}
+    		$db->free($result);
 		}
 	}
 } else {
diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php
index b8e8c97bc5e99fa14f7c30326140e61569efb01f..1a0710426f27ceed13bdd4d41b5bb5e82b83fb9f 100644
--- a/htdocs/product/stock/mouvement.php
+++ b/htdocs/product/stock/mouvement.php
@@ -699,7 +699,8 @@ if ($resql)
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 	
-	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
+    print '<div class="div-table-responsive">';
+    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
     print "<tr class=\"liste_titre\">";
     if (! empty($arrayfields['m.rowid']['checked']))            print_liste_field_titre($arrayfields['m.rowid']['label'],$_SERVER["PHP_SELF"],'m.rowid','',$param,'',$sortfield,$sortorder);
     if (! empty($arrayfields['m.datem']['checked']))            print_liste_field_titre($arrayfields['m.datem']['label'],$_SERVER["PHP_SELF"],'m.datem','',$param,'',$sortfield,$sortorder);
@@ -1001,7 +1002,10 @@ if ($resql)
     }
     $db->free($resql);
 
-    print "</table></form><br>";
+    print "</table>";
+    print '</div>';
+    print "</form>";
+    print "<br>";
 
     // Add number of product when there is a filter on period
     if (count($arrayofuniqueproduct) == 1 && is_numeric($year))
diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php
index 60b719df10ba94e25165c793ed9b902ac1730afe..5aed199fd00004c7f9b2ade12923860fbbaeb9f3 100644
--- a/htdocs/product/stock/productlot_list.php
+++ b/htdocs/product/stock/productlot_list.php
@@ -339,7 +339,8 @@ if ($resql)
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 	
-	print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
+    print '<div class="div-table-responsive">';
+    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 
     // Fields title
     print '<tr class="liste_titre">';
@@ -587,7 +588,8 @@ if ($resql)
 	print $hookmanager->resPrint;
 
 	print '</table>'."\n";
-
+    print '</div>';
+    
 	print '</form>'."\n";
 	
 	/*
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 276fc1cd722b9604ef75cf951cddf59397a00589..5a9a670456697607d8686ae7d73e918116f5a1ec 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -704,6 +704,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 		$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
 		$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 		
+        print '<div class="div-table-responsive">';
 		print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 		
 		print '<tr class="liste_titre">';
@@ -975,6 +976,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 		print '</tr>';
 
 		print "</table>";
+		print '</div>';
 		print "</form>";
 	}
 }
diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php
index a50e8509ba5a210ecb90dec0cb501910f2764166..d2649a42a43c875396e1ae7360076b88afadf445 100644
--- a/htdocs/supplier_proposal/list.php
+++ b/htdocs/supplier_proposal/list.php
@@ -341,6 +341,7 @@ if ($result)
     }
 	
 
+    print '<div class="div-table-responsive">';
     print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
     print '<tr class="liste_titre">';
 	print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
@@ -514,7 +515,8 @@ if ($result)
 	}
 
 	print '</table>';
-
+    print '</div>';
+    
 	print '</form>';
 
 	$db->free($result);
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index ab9c2f2b7d64a35cf1a6f3ecd4dc0e66f54d5eba..0082bbab20f0e9640aae89b4a84087d8b0772bac 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -582,15 +582,18 @@ div.myavailability {
 }
 
 /* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */
-.table-responsive {
+/*.table-responsive {
     width: calc(100% - 330px);
     margin-bottom: 15px;
     overflow-y: hidden;
     -ms-overflow-style: -ms-autohiding-scrollbar;
+}*/
+.div-table-responsive {
+    overflow-x: auto;
+    min-height: 0.01%;
 }
 
 
-
 /* ============================================================================== */
 /* Styles to hide objects                                                         */
 /* ============================================================================== */
@@ -2397,7 +2400,6 @@ td.border, div.tagtable div div.border {
 	border-bottom: 1px solid #000000;
 	border-left: 1px solid #000000;
 }
-
 .table-key-border-col {
 	/* width: 25%; */
 	vertical-align:top;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 6d8bc972cebc3cb31ab41b437a42d2d2db28aa06..6d4b84883504cfdffdbf21bf651b0ef9da20a7d0 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -593,6 +593,10 @@ div.myavailability {
     overflow-y: hidden;
     -ms-overflow-style: -ms-autohiding-scrollbar;
 }
+.div-table-responsive {
+    overflow-x: auto;
+    min-height: 0.01%;
+}
 
 
 /* ============================================================================== */