How can I make it so there's no newline between images in this HTML?
jsFiddle
As you can see in the jsFiddle above, after each image there is a line break before the next element. The other type of element, the cycling text, doesn't do this. How can I change this so that there is no newline after each i开发者_开发知识库mage? I want it to appear like this (blue boxes represent images, red boxes represent the cycling text element):
li { display: inline-block; }
should sort it.
You use li
elements which by default have this behaviour.
But for some elements you add a class to the li
named text-cycler
and the css for these is
ul.images li.text-cycler {
display: block;
float: left;
width: 96px;
height: 96px;
margin: 2px;
}
the float left is what causes those to be stacked one next to the other. but the li
with images do not have this class so they are not floated left.
精彩评论