+ 4
Inputs arenât fitting to tdâs size
Hello! In this code: https://sololearn.com/compiler-playground/WUVSeGs8etww/?ref=app The inputs inside td (to see the table press button calcularâŠ) arenât fitting to tdâs size. Can you help me? Thanks.
3 RĂ©ponses
+ 5
You could cancel the code line 213 as follows:
// inp.style.width = "15px";
+ 3
to make the input fit within the td element, u should set their with and height to 100% and remove any padding and borders.
try the following css code:
td {
border: 1px solid white;
text-align: center;
padding: 0;
width: auto;
}
td input {
border: none;
outline: none;
width: 100%;
height: 100%;
box-sizing: border-box;
font-size: 1rem;
padding: 0;
margin: 0;
}
place it in bottom of style maybe and also use JaScript proposed solution
+ 2
JaScript Amine Laaboudi Thank you so much for your answer!!! đ