Search code examples
htmlcsshtml-listsstylesheet

Trouble with sizing ul ul li


Ok. So I need to do something like this: the needed way I do it like this:

<ul>
    <li><img src="bla.png"></li>
    <li><img src="bla2.png></li>
    <li>
        <ul>
            <li>line 1</li>
            <li>line 2</li>
        </ul>
    </li>
</ul>

But whatever i Try i get this:

wrong1

I tried to make this :

ul ul li {
    display:block;
}

But i only got this: enter image description here

I tried to change line-height, but it didn't work!

Please, help me!!!

Thanks, in advance


Solution

  • Working Demo

    ul li{
        display:inline-block;
    }
    ul li ul > li{
        display:block;
    }