Gray block and orange fixed on the page. Tell me how to make the green block always stand in the middle between the left side of the screen and the orange block (the width of each block is fixed). Throw an idea, an example, please. Thank.


alt text

    3 answers 3

    Alternative option (without negative margin and arbitrary width of the central block.)

      Well, if the block sizes are known to you, i.e. manually set in pixels, it can be this way . If not with your hands, then all calculations can be done using JS / jQuery.

        Is the gray and orange block fixed literally, as in the answers above? If not, just in case: http://blog.html.it/layoutgala/LayoutGala23.html