How do I order images in a list in an inline style with css? I have tried puting inline style in the list tag but it is showing it in block form. Any help will be greatly appreciated
+1
A:
Version2 (and without gaps in images):
In the head:
<style>
ul li {display: inline;}
</style>
In body:
<ul>
<li><img src="1.gif"></li><!--
--><li><img src="2.gif"></li><!--
--><li><img src="3.gif"></li>
</ul>
This html comment "magic" is done because browsers interpret new line as a gap symbol between images.
arunas_t
2010-05-25 08:55:00
Wouldn't it make sense to apply ".images" to the list instead of each element? Semantically more correct and less verbose. The CSS would then have to be changed to .images li.
Ferdy
2010-05-25 09:12:01
Notice taken into account, code improved.
arunas_t
2010-05-25 09:20:19
Thanks, btw, upvoted.
arunas_t
2010-05-25 18:54:42