Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert bullet points into horizontal list?

Tags:

html

css

list

I want to show disc bullet points in my horizontal list.

I know that once we define in CSS: display: inline;, the class definition: list-style-type: disc does not work.

So this has been my solution:

                <ul>
                    <li>· EN</li>
                    <li>· ES</li>
                    <li>· ES</li>
                    <li>· DE</li>
                    <li>· FR</li>
                </ul>

I have put the symbol disc bullet point manually in my horizontal list and then I have declared that in my head section: <meta http-equiv="content-type" content="text/html;charset=utf-8" />.

In My coda editor preview they look fine, but if i try to browser it I get � this.

Why? How can I figure it out the problem? Otherwise, what is the best solution to show disc bullet point in a horizontal list?

like image 277
Koala7 Avatar asked Nov 08 '12 15:11

Koala7


2 Answers

Instead of choosing display:inline for your li you could keep them as blocks and do this:

li {
    float:left; 
}

Then you could play with the margins to space them how you need.

like image 119
Andy Avatar answered Oct 30 '22 08:10

Andy


Try display:inline-block

CSS

ul li{
    display:inline-block;
}

To work in IE6 and IE7:

CSS

ul li{
    display:inline-block;
    zoom:1;
}
like image 34
Enve Avatar answered Oct 30 '22 08:10

Enve