- Home
- /
- Design
- /
- DMBBootstrapBuilder
- /
- Section
Section
Full-width page regions with configurable height and background effects.
Height
SetHeight(value, UnitSize) controls the minimum height of the section.
Height variants
50 px
50 px
150 px
150 px
300 px
300 px
C#
@using DMBBootstrapBuilder
@using DMBEffectBuilder
@using DMBPageBuilder
@using (Html.BlockBuilder().AsSectionSubLabel().Begin())
{
@Html.TitleBuilder().SetTitle("50 px", TitleLevel.Six).AsSubSectionTitle().Render()
}
@using (Html.SectionBuilder().SetHeight(50, UnitSize.px).BootstrapBackgroundEffect(VariantStyle.Secondary).Begin())
{
@using (Html.FlexBlockBuilder().SetAlignItemsCenter().SetJustifyContentCenter().Begin())
{
@Html.TitleBuilder().SetTitle("50 px", TitleLevel.Six).Render()
}
}
@using (Html.BlockBuilder().AsSectionSubLabel(largeMargin: true).Begin())
{
@Html.TitleBuilder().SetTitle("150 px", TitleLevel.Six).AsSubSectionTitle().Render()
}
@using (Html.SectionBuilder().SetHeight(150, UnitSize.px).BootstrapBackgroundEffect(VariantStyle.Secondary).Begin())
{
@using (Html.FlexBlockBuilder().SetAlignItemsCenter().SetJustifyContentCenter().Begin())
{
@Html.TitleBuilder().SetTitle("150 px", TitleLevel.Six).Render()
}
}
@using (Html.BlockBuilder().AsSectionSubLabel(largeMargin: true).Begin())
{
@Html.TitleBuilder().SetTitle("300 px", TitleLevel.Six).AsSubSectionTitle().Render()
}
@using (Html.SectionBuilder().SetHeight(300, UnitSize.px).BootstrapBackgroundEffect(VariantStyle.Secondary).Begin())
{
@using (Html.FlexBlockBuilder().SetAlignItemsCenter().SetJustifyContentCenter().Begin())
{
@Html.TitleBuilder().SetTitle("300 px", TitleLevel.Six).Render()
}
}Background Effects
BootstrapBackgroundEffect(VariantStyle) applies a themed gradient background to the section.
Primary
Secondary
Success
Warning
Danger
Info
Normal
Background effects
VariantStyle.Primary
VariantStyle.Danger
C#
@using DMBBootstrapBuilder
@using DMBEffectBuilder
@using DMBPageBuilder
@using (Html.SectionBuilder().SetHeight(80, UnitSize.px).BootstrapBackgroundEffect(VariantStyle.Primary).Begin())
{
@using (Html.FlexBlockBuilder().SetAlignItemsCenter().SetJustifyContentCenter().Begin())
{
@Html.TitleBuilder().SetTitle("VariantStyle.Primary", TitleLevel.Six).Render()
}
}
@using (Html.SectionBuilder().SetHeight(80, UnitSize.px).BootstrapBackgroundEffect(VariantStyle.Danger).Begin())
{
@using (Html.FlexBlockBuilder().SetAlignItemsCenter().SetJustifyContentCenter().Begin())
{
@Html.TitleBuilder().SetTitle("VariantStyle.Danger", TitleLevel.Six).Render()
}
}
Session Consent : Consent to use session for this website