From 28d20b39c7b940e99081943314a8c6eb3a391aab Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Mon, 2 Mar 2026 13:41:24 +0700 Subject: [PATCH] fix: Make product tables responsive for mobile - Add horizontal scroll wrapper for narrow screens - Reduce font sizes on mobile (text-xs md:text-sm) - Add padding adjustments for mobile (px-3 py-2) - Add overflow-x-auto with negative margins for full-width scroll - Enable word break on cell content - Set min-width 600px for table readability - Add border-collapse for cleaner borders Tables now scroll horizontally on mobile with better readability. --- .../src/pages/products/[slug].astro | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/dealplustech-astro/src/pages/products/[slug].astro b/dealplustech-astro/src/pages/products/[slug].astro index 2701951b4..e5123047a 100644 --- a/dealplustech-astro/src/pages/products/[slug].astro +++ b/dealplustech-astro/src/pages/products/[slug].astro @@ -52,19 +52,41 @@ const productTables = productData?.productTables || [];
{productTables.map((table, tableIndex) => ( -
-

+
+

{table.tableName}

-
- - - - {table.headers.map((header, headerIndex) => ( - +
+
+
- {header} -
+ + + {table.headers.map((header, headerIndex) => ( + + ))} + + + + {table.rows.map((row, rowIndex) => ( + + {row.map((cell, cellIndex) => ( + + ))} + ))} + +
+ {header} +
+ {cell} +
+
+
+

+ ))} +
+ + )})}