Skip to content

Instantly share code, notes, and snippets.

@adamdehaven
Last active September 19, 2024 13:29
Show Gist options
  • Save adamdehaven/dceabb07450295fec6fc to your computer and use it in GitHub Desktop.
Save adamdehaven/dceabb07450295fec6fc to your computer and use it in GitHub Desktop.
Bootstrap full-width hero section with text and image
.bgimage {
width:100%;
height:500px;
background: url('https://images.unsplash.com/photo-1438109491414-7198515b166b?q=80&fm=jpg&s=cbdabf7a79c087a0b060670a6d79726c');
background-repeat: no-repeat;
background-position: center;
background-size:cover;
background-attachment: fixed;
}
.bgimage h5 {
color:white;
text-shadow:2px 2px #333;
}
<section class="bgimage">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<h5>Hello, world! Full width Hero-unit header</h5>
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a href="#" class="btn btn-primary btn-large">Learn more »</a></p>
</div>
</div>
</div>
</section>
@cmiller734
Copy link

A CodePen would wrap this up nicely, I believe. Nice work

@eversionsystems
Copy link

Bootstrap 4 version using jumbotron https://codepen.io/eversionsystems/pen/YOmqdj

@israr-ahmad
Copy link

Thanks, Nice work

@digifoxman
Copy link

Simple and effective, thanks!

@raj1rana
Copy link

This helps,
Thanks,

@J-Zam
Copy link

J-Zam commented Jul 20, 2020

thanks

@twolters
Copy link

super helpful, thanks

@zahed-ali
Copy link

Thank you

@dduart3
Copy link

dduart3 commented Feb 16, 2021

tyty

@Milan2020-web
Copy link

Thank you

@veronicaadler
Copy link

This helped me learn how to make a hero image on my webpage. Thank you!

@CDUCI
Copy link

CDUCI commented Jun 11, 2021

Thank you for this!

@bitkom-ev
Copy link

Thanks!

@BA-CalderonMorales
Copy link

This looks amazing! Thanks!

@SipofTea
Copy link

Thank you it's great!

@noahselis
Copy link

You rule! Thank you!

@filipkappa
Copy link

Here are examples for the Bootstrap 5 version:
https://mdbootstrap.com/docs/standard/navigation/headers/

@thomhoward
Copy link

This is a great simple example. A huge help!

@BetCoaster
Copy link

great saved me so much time thankyou

@basilcloud
Copy link

Thank you! This was really helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment