From faaca2b5b9bf7263a98a569e3b74f2db0e4f338c Mon Sep 17 00:00:00 2001 From: DahmaneYanis Date: Wed, 20 Dec 2023 09:52:20 +0100 Subject: [PATCH] Overflow --- front/style/home.css | 16 ++++++++++++---- front/views/Home.tsx | 11 ++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/front/style/home.css b/front/style/home.css index 56fcb8f..63795eb 100644 --- a/front/style/home.css +++ b/front/style/home.css @@ -36,6 +36,8 @@ #sideMenu { background-color: grey; + + overflow: hidden; } #titlePersonalSpace h2 { @@ -73,16 +75,22 @@ width: 100%; border-collapse : separate; border-spacing : 1em; + table-layout: fixed; + overflow: hidden; } -td { - border : 3px solid black; +#bodyPersonalSpace td { + width: 80px !important; padding-bottom : 1%; padding-top : 1%; - margin: 80px; + height: fit-content; text-align: center; + overflow: hidden ; +} +.dataTactic { + border : 3px solid black; } -td:hover { +.dataTactic:hover { background-color: red; } \ No newline at end of file diff --git a/front/views/Home.tsx b/front/views/Home.tsx index 42d85c1..da127f7 100644 --- a/front/views/Home.tsx +++ b/front/views/Home.tsx @@ -97,10 +97,19 @@ function BodyPersonalSpace({ allTactics } : { allTactics : Tactic[]}) { i = 0; while (i < nbRow) { listTactic[i] = listTactic[i].map((tactic : Tactic) => - {location.pathname="/tactic/"+tactic.id+"/edit"}}>{tactic.name} + {location.pathname="/tactic/"+tactic.id+"/edit"}}>{tactic.name} ); i++; } + if (nbRow == 1) { + if (listTactic[0].length < 3) { + for (let i = 0; i <= 3-listTactic[0].length; i++) { + listTactic[0].push(); + } + } + } + + console.log(listTactic); const data = listTactic.map((tactic, rowIndex) =>