Aligning input boxes with grid | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Aligning input boxes with grid

I tried aligning five input boxes on a row with grid but it overflows the box. I used 1fr for each column. Though when I used 20% for each column, it worked, but when I add padding, it overflows. I want to know why 1fr doesn't work since it is to separate the parent div into 5 equal parts. https://code.sololearn.com/Wa6b14E6rHLK/?ref=app

25th Jul 2020, 2:56 PM
Fasasi Sherif
Fasasi Sherif - avatar
2 Answers
+ 2
Okay, thanks. But it wasn't responsive. After, using 1fr for each column, the input tag shouldn't be that big. It should fit into the .userInput container. But for some reason it doesn't.
26th Jul 2020, 9:55 AM
Fasasi Sherif
Fasasi Sherif - avatar
0
in CSS file at .userinput field, you wrote width as 80% change it to 110%
26th Jul 2020, 9:47 AM
Adapa Vijaya Sai Sindhu
Adapa Vijaya Sai Sindhu - avatar