I have the following CSS:
#imageContainer { width: 100%; margin: 0px; margin-bottom: 10px; } .divSelectImage { border: 2px solid red; width: 25%; margin: 0px; margin-bottom: 10px; float: left; }
I have four instances of .divSelectImage , so the width is 25%. I expect to see all four images next to each other inside the #imageContainer . Essentially, four images should occupy 100% of the #imageContainer , which in turn will occupy 100% of the screen.
But I do not. Despite the fact that in Firebug, 25% each, the last image moves to the next line. I have to make them about 24.5% for them to fit, but I don't want the gap to be at the end.
This happens in both Firefox and Google Chrome.
Is there any CSS magic I'm missing? How can i do this?
I installed the script on JSFiddle: http://jsfiddle.net/J3KXE/
source share