Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css - unordered list with no hard returns

Tags:

css

html-lists

How can I make unordered list (ul/li) not begin on a new line for each LI. User wants the bullet, but to save space, not show bullet on each line.

Yes I know it is strange request.

like image 269
mustapha george Avatar asked Oct 28 '25 04:10

mustapha george


2 Answers

You could use:

li { display: inline; }

To remove the way that li's normally go on a new line. People have used that method in additional to style: none; for CSS based horizontal navigation for quite a while now.

like image 88
dougajmcdonald Avatar answered Oct 30 '25 16:10

dougajmcdonald


Try this:

li {
    float: left;
    margin: 0 15px
}
like image 37
thirtydot Avatar answered Oct 30 '25 14:10

thirtydot