Just changed some css and it works. See this script: http://jsfiddle.net/J3F99/
Well, the main changes:
box-sizing: border-box to.group, so width% includes padding (10px).- Added
display: inline-block to and removed float: left in.group and text-align: center in .row-fluid so that .group elements are centered. - Added
max-width: 350px and max-height: 150px in .group - Adjusted% width for different screen sizes to cover full width and still maintain maximum width
- Removed css in media queries, removing duplicate properties that are already inherited from the common style for .group for all screens.
Here it is. It works well in chrome. I do not test in other browsers. During testing, use the full download.
The main problem here is the padding specified in pixels. To ensure a clean fluid structure, you should use% instead, if pixels. And for this you need to use margin, not padding for .group. Since the margin in% depends on the width of the container.
For example, 4.group elements with a width of 20%, as well as margins with left and right 2.5% will fit exactly into the container (there is liquid here), without leaving a single pixel.
4 * 20 + 4 * 2.5 * 2 = 100%
I recommend you go with this method. See @Bharat Parmar for this.
source share