How to display an HTML list non-nested?

Posted by Georg on Stack Overflow See other posts from Stack Overflow or by Georg
Published on 2010-06-03T12:47:06Z Indexed on 2010/06/03 13:04 UTC
Read the original article Hit count: 191

Filed under:
|

Here's the HMTL

<ul>
    <li>Salads</li>
    <li>Fruits
        <ul>
            <li>Apples</li>
            <li>Prunes</li>
        </ul>
    </li>
    <li>Main Course</li>
</ul>

Here's what it looks like now:

Salads Fruits
   Apples Prunes
Main Course

And here's what I'd like it to look like:

Salads Fruits Main Course
Apples Prunes

How can I achieve this, without modifying the HTML?

Current CSS:

ul {
    list-style:none;   
    display:block;
}
li {
    display:inline-block;
}

© Stack Overflow or respective owner

Related posts about html

Related posts about css