I have a problem woth floating divs. On this site you can see a demo which shows the problem. There is a gallery which should display all the images in one wide row. Unfortunately all the images are showing below. Each slide wrapper is relative positioned, has given height and width and it has float set to left as well. It looks like pretty standard stuff but it is not working for me in this case:(.
All the code is bundled with the site, so better than posting it here would be looking in the web inspector. But if someone would mind, I can provide some code here:)
Thanks for your help
Your problem is not with floating, that’s fine and should be float:left.
But to have all the images left to right, you need a wider parent element, in your case, try changing this:
to this:
Should help. The 10000px width is a made-up number. To see how much is enough for you, calculate the total width of all the divs you’re trying to align.
Lets say that they are all 500px wide, and there are 10 of them. 5001px (one added) should be enough for you if there are no margins on your divs. If you have margins add them as well.