Faced a problem with layout. I need a grid of small blocks, using a float or just an inline-block pressed to the left, and the grid itself should always be pressed to the right. Those. the width of the outdoor unit must always remain equal to the width of the content. This can be done, for example, by assigning the same inline-block to it, but the problem is that when the number of indoor units becomes such that they do not fit in one line and go to the next, the width of the external unit becomes 100%, the indentation increases accordingly of the rightmost small block, from the right edge of the screen. Must always remain the same. Is it possible to somehow make such a grid always pressed to the right edge without js hacks?
<div class="grid"> <div style="float:right"></div> <div style="float:right"></div> <div style="float:right"></div> <div style="float:right"></div> </div> Here it is. In the first picture, what you need: a block whose width depends on the width of the screen, with the grid inside, always pressed to the right edge. On the second and third problems. PS in the figure of columns 5, but it can be any number depending on the width of the external unit.
