How do i align many elements in a horizontal line and if overflowed, they should scroll... | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 9

How do i align many elements in a horizontal line and if overflowed, they should scroll...

Please help me i tried a lot about this situation

6th Aug 2021, 2:35 PM
Anas Dharar
Anas Dharar - avatar
7 Respostas
+ 9
.hor-scroll { display: flex; overflow-x: auto; } .hor-scroll > * { flex: none; } https://code.sololearn.com/W0ceELlLGdg2/?ref=app
6th Aug 2021, 3:16 PM
CalviÕ²
CalviÕ² - avatar
+ 5
Anas Yes, It is needed but I just said about overflow šŸ˜Š, I think you found an answer, Calvin already answer......
6th Aug 2021, 3:39 PM
Ayush
Ayush - avatar
+ 4
Make:: overflow: auto; Which make it scroll when it is necessary..... If you want to make scroll, You need to make :: overflow: scroll; Which makes the elements to be scrolled..... šŸ¤”May help you.....:-)
6th Aug 2021, 3:06 PM
Ayush
Ayush - avatar
6th Aug 2021, 2:46 PM
Yamily Fernandez
Yamily Fernandez - avatar
+ 3
Yeah I tried it in VS Code it works They are right ā–¶ļø
6th Aug 2021, 3:46 PM
Hassaan
Hassaan - avatar
+ 2
֎ā‚³Ā„Ʉ$Ħ֎ so display and position is not necessary??
6th Aug 2021, 3:08 PM
Anas Dharar
Anas Dharar - avatar
+ 2
Thanks a lot CalviÕ²
6th Aug 2021, 3:21 PM
Anas Dharar
Anas Dharar - avatar