Example 1 - Flowing into 3 regions with fixed widths

In this example, we flow a chunk of text all stored within one div. This text is then put into a flow which is then retrieved from 3 region divs.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

Example 2 - Flowing into 3 regions with fluid widths

In example #2 we take a similar chunk of text all contained within one div and put it into a flow. We then have 3 divs which "flow-from" the named flow we just made. The 3 region divs have their widths set at 20%.

Tip:Try resizing your browser and take notice of how the text flows within the boxes

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Example 3 - Using the JavaScript API for Regions

In some browsers it is possible to call element.regionOverflow (try webkitRegionOverflow in Webkit) which can return values such as 'fit', 'empty' or 'overflow', where element is an element which is a region.

Tip: Try resizing your browser to see how the regionOverflow changes per region

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

(Where named_flow is document.webkitGetFlowByName('example-3-text')

Example 4 - Using text and images with regions

Here we can see how browsers treat images within regions, you may notice how images get cut off where necessary. The source content is a bunch of images of varying dimensions, text in paragraph tags and an unordered list.

Note: Image dimensions are always directly in the middle so you should be able to tell where they begin and where they end (which can look odd when they're split across multiple regions)

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. placeholder image placeholder image placeholder image

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

placeholder image placeholder image placeholder image

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

placeholder image
placeholder image