Center
Center content horizontally. Use it as a layout wrapper or to center content inside a parent. Will take exact size given.
Link to section titled: Component
Component
Center
- html<!-- COMPONENT-START: nc-center -->
<div class="nc-center">
<div class="example-block"></div>
</div>
<!-- COMPONENT-END: nc-center --> Link to section titled: Usage notes
Usage notes
- To use it as a layout wrapper, pair it with a simple class, that sets the CSS Variables to your desired layout specifics.
Link to section titled: CSS Variables
CSS Variables
- --center-measure
- Set the max width of the container. Defaults to
max-content. - --center-padding
- Set the padding of the container. Defaults to
0.