css unso :3

This commit is contained in:
Felix Pankratz 2022-07-05 20:42:38 +02:00
parent c4863a8bb5
commit 89f35a4c9e
3 changed files with 21 additions and 0 deletions

View File

@ -8,6 +8,8 @@
<title>Bingo</title> <title>Bingo</title>
<meta name="description" content="Stammtisch Bingo"> <meta name="description" content="Stammtisch Bingo">
<link rel="stylesheet" href="style.css">
</head> </head>
<body> <body>

View File

@ -41,9 +41,16 @@ function generateTable() {
row = thead.insertRow(); row = thead.insertRow();
} }
let cell = row.insertCell(); let cell = row.insertCell();
let text = document.createTextNode(field); let text = document.createTextNode(field);
cell.appendChild(text); cell.appendChild(text);
}); });
table.addEventListener('click', (ev) => {
if (ev.target.tagName.toLowerCase() == "td" ) {
ev.target.style.borderColor = "green";
}
});
} }
generateTable(); generateTable();

12
style.css Normal file
View File

@ -0,0 +1,12 @@
table, th, td {
border: 1px solid;
}
table {
width: 100%;
}
td {
text-align: center;
height: 50px;
}