departedmind Posted November 10, 2008 Share Posted November 10, 2008 Hi guyz, I am having a problem displaying images horizontally (well dont have the code now) so giving example main div's width is 1000px and is centered and left navigation is 200px wide and is floated left and i used display inline also and on remaining 800px i kept thumbnails images whose size varies and I kept those thumbnails in UL and LI so it is like this (rough one) #maindiv { width:1000px; margin:0 auto;} #leftdiv { width: 200px; float:left; display:inline; } #thumbDiv { width:800px;} #thumbDiv ul li { float:left; display: inline;} I want to display the thumbnails side by side, i tried keeping float and display in div, ul and li but it does not work 2nd thumbnail always comes down of the first one can anyone guide me thanks.... Quote Link to comment https://forums.phpfreaks.com/topic/132141-floatleft-and-displayinline-confusion/ Share on other sites More sharing options...
SuperBlue Posted November 10, 2008 Share Posted November 10, 2008 If you placed the images inside li elements, then you need to float: left; the li elements, whitout applying display: inline; to the li elements. You can then use margin-left to create a gap between each image. I.e. li { float: left; margin-left: 1em; } Quote Link to comment https://forums.phpfreaks.com/topic/132141-floatleft-and-displayinline-confusion/#findComment-687034 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.