0

How to add two lists in one div

9th Aug 2017, 11:26 AM
Giridhar Reddy
Giridhar Reddy - avatar
5 odpowiedzi
+ 3
If you mean in Html (@Adi answer guess with JS), just put the code of your two list next to each other inside once <div>: <div> <ul> <li>item<li> <li>item<li> <li>item<li> </ul> <ul> <li>item<li> <li>item<li> <li>item<li> </ul> </div> If you mean how to have them on two column, you should style them according to that not default behaviour... Feel free to ask help for doing so if it's what you want: I don't want to explain if this is offtopic ;)
9th Aug 2017, 12:39 PM
visph
visph - avatar
+ 2
Add these css rules to the previous code: div { display:flex; align-item:center; justify-content:center; } ul { flex:1; }
9th Aug 2017, 12:49 PM
visph
visph - avatar
- 1
i want horizontal
9th Aug 2017, 12:44 PM
Giridhar Reddy
Giridhar Reddy - avatar
- 1
inline
9th Aug 2017, 12:45 PM
Giridhar Reddy
Giridhar Reddy - avatar
- 1
thank you
9th Aug 2017, 12:51 PM
Giridhar Reddy
Giridhar Reddy - avatar