If you are using a
fixed navbar, you can use the
is-fullheight-with-navbar modifier on the hero for it to occupy the viewport height minus the navbar
height.
Example
Fullheight hero with navbar
HTML
<navclass="navbar"><divclass="container"><divid="navMenu"class="navbar-menu"><divclass="navbar-start"><aclass="navbar-item">
Home
</a><aclass="navbar-item">
Documentation
</a></div><divclass="navbar-end"><divclass="navbar-item"><divclass="buttons"><aclass="button is-dark">Github</a><aclass="button is-link">Download</a></div></div></div></div></div></nav><sectionclass="hero is-link is-fullheight-with-navbar"><divclass="hero-body"><pclass="title">Fullheight hero with navbar</p></div></section>
To obtain a hero that will cover the whole height of the viewport, you can split it in
3 vertical parts:
hero
hero-head (always at the top)
hero-body (always vertically centered)
hero-foot (always at the bottom)
Example
Title
Subtitle
HTML
<sectionclass="hero is-primary is-medium"><!-- Hero head: will stick at the top --><divclass="hero-head"><navclass="navbar"><divclass="container"><divclass="navbar-brand"><aclass="navbar-item"><imgsrc="https://bulma.io/assets/images/bulma-type-white.png"alt="Logo"/></a><spanclass="navbar-burger"data-target="navbarMenuHeroA"><span></span><span></span><span></span><span></span></span></div><divid="navbarMenuHeroA"class="navbar-menu"><divclass="navbar-end"><aclass="navbar-item is-active"> Home </a><aclass="navbar-item"> Examples </a><aclass="navbar-item"> Documentation </a><spanclass="navbar-item"><aclass="button is-primary is-inverted"><spanclass="icon"><iclass="fab fa-github"></i></span><span>Download</span></a></span></div></div></div></nav></div><!-- Hero content: will be in the middle --><divclass="hero-body"><divclass="container has-text-centered"><pclass="title">Title</p><pclass="subtitle">Subtitle</p></div></div><!-- Hero footer: will stick at the bottom --><divclass="hero-foot"><navclass="tabs"><divclass="container"><ul><liclass="is-active"><a>Overview</a></li><li><a>Modifiers</a></li><li><a>Grid</a></li><li><a>Elements</a></li><li><a>Components</a></li><li><a>Layout</a></li></ul></div></nav></div></section>
<sectionclass="hero is-success is-fullheight"><!-- Hero head: will stick at the top --><divclass="hero-head"><headerclass="navbar"><divclass="container"><divclass="navbar-brand"><aclass="navbar-item"><imgsrc="https://bulma.io/assets/images/bulma-type-white.png"alt="Logo"/></a><spanclass="navbar-burger"data-target="navbarMenuHeroC"><span></span><span></span><span></span><span></span></span></div><divid="navbarMenuHeroC"class="navbar-menu"><divclass="navbar-end"><aclass="navbar-item is-active"> Home </a><aclass="navbar-item"> Examples </a><aclass="navbar-item"> Documentation </a><spanclass="navbar-item"><aclass="button is-success is-inverted"><spanclass="icon"><iclass="fab fa-github"></i></span><span>Download</span></a></span></div></div></div></header></div><!-- Hero content: will be in the middle --><divclass="hero-body"><divclass="container has-text-centered"><pclass="title">Title</p><pclass="subtitle">Subtitle</p></div></div><!-- Hero footer: will stick at the bottom --><divclass="hero-foot"><navclass="tabs is-boxed is-fullwidth"><divclass="container"><ul><liclass="is-active"><a>Overview</a></li><li><a>Modifiers</a></li><li><a>Grid</a></li><li><a>Elements</a></li><li><a>Components</a></li><li><a>Layout</a></li></ul></div></nav></div></section>