From 89f35a4c9e5f5cb2ebb67b798a4ff789e2ab1668 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Tue, 5 Jul 2022 20:42:38 +0200 Subject: [PATCH] css unso :3 --- bingo.html | 2 ++ script.js | 7 +++++++ style.css | 12 ++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 style.css diff --git a/bingo.html b/bingo.html index 03c63e4..72351e2 100644 --- a/bingo.html +++ b/bingo.html @@ -8,6 +8,8 @@ Bingo + + diff --git a/script.js b/script.js index f99fe31..d39c875 100644 --- a/script.js +++ b/script.js @@ -41,9 +41,16 @@ function generateTable() { row = thead.insertRow(); } let cell = row.insertCell(); + let text = document.createTextNode(field); cell.appendChild(text); }); + + table.addEventListener('click', (ev) => { + if (ev.target.tagName.toLowerCase() == "td" ) { + ev.target.style.borderColor = "green"; + } + }); } generateTable(); diff --git a/style.css b/style.css new file mode 100644 index 0000000..3962a15 --- /dev/null +++ b/style.css @@ -0,0 +1,12 @@ +table, th, td { + border: 1px solid; +} + +table { + width: 100%; +} + +td { + text-align: center; + height: 50px; +}