Since the .page-header
class has been deprecated in Bootstrap 4, how can someone create a page header with the same style as Bootstrap 3 .page-header
class?
Step 1: Include Bootstrap and jQuery CDN into the <head> tag before all other stylesheets to load our CSS. Step 2: Add <div> tag in the HTML body with class container. Step 3: To use a page header, wrap your heading in a <div> with a class of . page-header.
Bootstrap Jumbotron and Page Header.
Page header is used to add appropriate spacing around the headings on a page.
According to the migration docs, the Bootstrap 4 utility classes should be used instead:
<div class="pb-2 mt-4 mb-2 border-bottom"> Page header </div>
https://codeply.com/go/20jBKvMkHx
To my understanding, there isn't a direct replacement in bootstrap 4 for the bootstrap 3 .page-header
.
However the CSS for the bootstrap 3 .page-header
is simply:
padding-bottom: 9px; margin: 40px 0 20px; border-bottom: 1px solid #eee;
So you could create your own class in your css file:
.page-header { padding-bottom: 9px; margin: 40px 0 20px; border-bottom: 1px solid #eee; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With