I have an unordered list, listaAuto
, which is filled with <li>
items, which contain an img
for each.
The problem is that if I use the <li>
property display: inline;
, they won't expand to contain the images. Instead, if I display them horizontally, they are no mistakes.
I already tried using overflow: auto
, height: auto
, clear: both:
and other solutions, but I still can't find the way.
HTML:
<body>
<div>
<ul id="listaAuto">
<li><img src="example.png" width="121.33" height="75.92"/></li>
<li><img src="example.png" width="121.33" height="75.92"/></li>
</ul>
</div>
</body>
CSS:
#listaAuto, li{
list-style: none;
padding: 5px;
}
li{
clear: both;
display: inline;
border: 1px solid black;
}
Current output: