Skip to content
Advertisement

Full Page Layout with Bootstrap and Vue 3

I’m trying to create a Single Page Application with a simple layout of Header -> Content -> Footer using Vue3 and the Bootstrap 5 framework.

I am trying to get the Content to fill the space between header and footer and footer to flush to the bottom of page & content so there is no overlap. However the application just renders everything on the top half of the page leaving the bottom half a white space. I’ve tried a flexbox approach however something doesn’t seem to be clicking right.

App.vue

JavaScript

HeaderBar.vue

JavaScript

FooterBar.vue

JavaScript

Advertisement

Answer

JavaScript
JavaScript

Strip the two div‘s around HeaderBar and FooterBar in App.vue.

Remove all styles from body and put them into #app, add justify-content: space-between. With height: 100vh you’ll get a scrollbar. Use 98 to avoid that.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement