If you want the last div always to the right, the result will be that there’s going to be a bigger space between the last one and the second-to-last one. So you want to address that too and you probably want to have the same amount of space between all divs.
There’s two ways of doing this:
First, make sure each div has space on both sides (not just left only, or right only).
OR….give all divs a right margin except the last one (or a left margin except the first one) but calculate how much you need.
margin for each div = ( (available full width) – (number of divs * width of each div) ) / (number of divs -1)
I think the first option is easier, and probably better for responsive designs, but then you’ll always have spacing on the left and right of your row.
you should have equal paddings left and right, you only got 20px right so…and instead of margin-bottom you could have only paddings like 5px 10px 5px 10px or whatever you like.
But…if you defenitely don’t want paddings to the right on the last div you should put .float-project:last-child: padding-right: 0 in your media queries…in your .float-project.
Was that the thing?
i see…got bigger because of the border-box setting offcourse….so set the last img to padding-box. Or you could use margins in percentages instead of paddings and calculate…4 in a row, then width 23% and margin 2% ? or 23.5% and margin: 1.5% 1.5% 1.5% 0 and so on. Then use that nth-child.