Template:Gallery layout/doc

is a wrapper (or wrapper start tag) for blocks of arbitrary display: inline-block content (usually images generated by templates) to have them display in a style similar to  output: The blocks are auto-centered on one line, and wrap only as necessary to fit the window width, re-centering upon wrapping.

Demo: Test the sample content at the top of the Template:Gallery layout page by changing your browser window width to very narrow, medium, and very wide.

Usage
As a total wrapper, use 1 (a.k.a. content) to introduce the blocks of formatted content.

As a wrapper-start tag, it is used with the closing tag. Depending upon the content, the above method may not work; try this approach in such a case.

Content blocks
The easy way to do a content block is to wrap each with :

or, if this doesn't work due to complex content:

Manual CSS method: A content block can also be formed by adding specific CSS to an arbitrary HTML element that normally has a css display type of block (i.e., it will not work on an inline element like ). The element must simply have the following CSS:. This can be done as a wrapper (which is what  is), added directly to an element such as a, or added as a template parameter to pass CSS to a meta-template, depending on the application.

The demo at the top of the Template:Gallery layout page can be manually reproduced with the following:

Output: