kavita deshpande kavita deshpande - 5 months ago 8
CSS Question

How to force a list to be vertical using html css

I have a list i want to add to a

<div>
. Each listitem contains a
<div>
which in turn contain an image and a text string. The list must be vertical. I ve tried putting
display:block
for the
<ul>
with
width:100%
but the list is flowing left to right horizontally. How do I make the list vertical?

Answer

Try putting display: block in the <li> tags instead of the <ul>