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