+ 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.

8th Sep 2023, 3:11 PM
Ugulberto SĂĄnchez
Ugulberto SĂĄnchez - avatar
3 RĂ©ponses
+ 5
You could cancel the code line 213 as follows: // inp.style.width = "15px";
8th Sep 2023, 4:48 PM
JaScript
JaScript - avatar
+ 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
8th Sep 2023, 5:07 PM
Amine Laaboudi
Amine Laaboudi - avatar
+ 2
JaScript Amine Laaboudi Thank you so much for your answer!!! 😃
8th Sep 2023, 7:15 PM
Ugulberto SĂĄnchez
Ugulberto SĂĄnchez - avatar