views:

29

answers:

3

What's the best way to align images ina list. I am trying something like and I expect them to see aligned vertifically below each other but the text kinda wraps aorund the image.

  • text
  • image
  • text
A: 

To remove text, put all text in floating elements and put clear: both in images. With this, the text will not wrap image.

Topera
A: 

I could be wrong but it sounds like you're using floats. There's no need.

CSS:

#mylist li{ display: block }

HTML:

<ul id="myLst">
  <li>text</li>
  <li><img src="my-image.png" alt="" /></li>
  <li>text</li>
</ul>

That will align each List Item on top of one another.

Jamie
A: 
GusDe CooL