Layouts/Margins

fd-panel · 10 examples from SAP's documentation · Back to the gallery

About

The CSS margin properties are used to create space around elements, outside of any defined borders. With CSS, you have full control over the margins. There are properties for setting the margin for each side of an element. We now provide a number of predefined margin clases which add predefined margin values.

All-Round Margin

All-round margin appears on all sides of the container they are applied to. Use \

container(tiny)
container(sm)
container(md)
container(lg)

Single-Sided Margin Top

Single sided margins appear on only one of the sides of the element: - top - displayed on top of the element - end - displayed on the right side and in right-to-left mode on the left side of the element - bottom - displayed on the bottom of the element - begin - displayed on the left side and in right-to-left mode on the right side of the element. Use \

container(tiny)
container(sm)
container(md)
container(lg)

Single-Sided Margin End

container(tiny)
container(sm)
container(md)
container(lg)

Single-Sided Margin Bottom

container(tiny)
container(sm)
container(md)
container(lg)

Single-Sided Margin Begin

container(tiny)
container(sm)
container(md)
container(lg)

Double-Sided Margin Top-Bottom

Double sided margins appear on two opposite sides of the element. - top-bottom - displayed on top and bottom of the element - begin-end - displayed on left and right side of the element Use \

container(tiny)
container(sm)
container(md)
container(lg)

Double-Sided Margin Begin-End

container(tiny)
container(sm)
container(md)
container(lg)

NoMargin

No margin classes remove existing container margins. Use \

container
container
container
container
container

ResponsiveMargin

The responsive margins class adds a margin around an element based on the width of the container the element is in. Use \

container(sm)
container(md)
container(lg)
container(xl)

Double-Sided Negative Margin Begin-End

The negative margin class adds a double sided negative margin to an element. This is useful when aligning elements with built-in paddings. Use \

Panel header

Panel header

Panel header

Panel header