Is there any way to keep list elements straight in an html file? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 5

Is there any way to keep list elements straight in an html file?

it's just like i have a list of multiple items. and i need to place them all in my code. so is their any way to place them all in a straight line. let's understand this with an examle- <ol> <li> list1 </li> <li> list2 </li> <li> list3 </li> <li> list4 </li> <li> list5 </li> </ol> i need to convert this multiple line code into a straight liner one. suggest me how?

29th Jan 2018, 5:10 PM
Deepanshu Dwivedi
Deepanshu Dwivedi - avatar
5 ответов
+ 5
@saju it is really working. thank u for your feedback. it'll useful for me..
2nd Feb 2018, 1:57 PM
Deepanshu Dwivedi
Deepanshu Dwivedi - avatar
+ 3
😊
2nd Feb 2018, 4:40 PM
Saju Jacob
Saju Jacob - avatar
+ 2
try using li{ display:inline-block; } in css
2nd Feb 2018, 6:55 AM
Saju Jacob
Saju Jacob - avatar
+ 1
what do you mean? can you give us an example please. :)
30th Jan 2018, 5:00 AM
Tim Millar
Tim Millar - avatar
+ 1
Yes, you can use : • li { display: inline-block } "OR" • li { float: left }
14th Jul 2019, 6:56 AM
Rahul Jangid
Rahul Jangid - avatar