How to shrinkwrap and center an element – demo page

This is a demo document related to the article How to shrinkwrap and center elements horizontally. Please see the article for context and information.

Centered with display:inline-block

Centered with position:relative

Centered with display:table

Centered with display:inline-flex

Centered with width:fit-content / width:intrinsic

Lab Index | 456 Berea Street Home | Copyright © 2003-2014 Roger Johansson