Quellcode durchsuchen

fixing word wrap

Medowar vor 3 Wochen
Ursprung
Commit
b32d0c040c
2 geänderte Dateien mit 10 neuen und 2 gelöschten Zeilen
  1. 2 2
      admin/products.php
  2. 8 0
      assets/css/style.css

+ 2 - 2
admin/products.php

@@ -462,7 +462,7 @@ function updateAvailabilityFields() {
         <table class="responsive-table">
             <thead>
                 <tr>
-                    <th>ID</th>
+                    <th class="product-id-column">ID</th>
                     <th>Name</th>
                     <th>Kategorien</th>
                     <th>Größen</th>
@@ -473,7 +473,7 @@ function updateAvailabilityFields() {
             <tbody>
                 <?php foreach ($products as $product): ?>
                     <tr>
-                        <td data-label="ID"><?php echo (int) $product[
+                        <td data-label="ID" class="product-id-column"><?php echo (int) $product[
                             "id"
                         ]; ?></td>
                         <td data-label="Name"><?php echo escape(

+ 8 - 0
assets/css/style.css

@@ -438,6 +438,14 @@ table tr:hover {
     white-space: normal;
 }
 
+.table-responsive th.product-id-column,
+.table-responsive td.product-id-column {
+    min-width: 3.5rem;
+    white-space: nowrap;
+    word-break: normal;
+    overflow-wrap: normal;
+}
+
 /* Admin: use more horizontal space so tables fit */
 body.admin-page .container {
     max-width: none;