How to make text center in Hero image with bootstra

0 votes
Can you explain How to make text center in Hero image with bootstra
Mar 19 in Node-js by Ashutosh
• 23,230 points
48 views

1 answer to this question.

0 votes

You can use a combination of Bootstrap's grid system and custom CSS. Below is an example of how you can achieve this:

HTML:

<div class="hero-image" style="background-image: url('your-image.jpg');">

  <div class="container">

    <div class="row">

      <div class="col-xs-12 text-center">

        <h1 class="hero-text">Centered Text</h1>

        <p class="hero-subtext">Any subtitle</p>

      </div>

    </div>

  </div>

</div>

CSS:

.hero-image {

  position: relative;

  height: 400px;

  background-size: cover;

  background-position: center;

  display: flex;

  align-items: center;

  justify-content: center;

  color: white; 

}


.hero-text {

  font-size: 3em; 

  font-weight: bold;

}


.hero-subtext {

  font-size: 1.5em; 

  margin-top: 10px;

}

answered Mar 24 by anonymous

Related Questions In Node-js

0 votes
1 answer

How to paginate with Mongoose in Node.js?

Hello @kartik, You can chain just like that: var ...READ MORE

answered Jul 15, 2020 in Node-js by Niroj
• 82,840 points
1,024 views
0 votes
1 answer

How to Pass route control with optional parameter after root in express?

Hello @kartik, That would work depending on what ...READ MORE

answered Oct 12, 2020 in Node-js by Niroj
• 82,840 points
14,719 views
+1 vote
1 answer

How to make external HTTP requests with Node.js ?

Hello @kartik, Use this: var http = require('http'); var options ...READ MORE

answered Oct 12, 2020 in Node-js by Niroj
• 82,840 points
1,963 views
0 votes
1 answer

How to use MongoDB with promises in Node.js?

Hello @kartik, Try this: var MongoClient = require('mongodb').MongoClient var url ...READ MORE

answered Oct 12, 2020 in Node-js by Niroj
• 82,840 points
1,603 views
0 votes
1 answer

How to create a hidden input field in a form in HTML?

You can use the type attribute with ...READ MORE

answered Mar 24 in HTML by anonymous
52 views
0 votes
0 answers
0 votes
1 answer

How to create a table with zebra-striped rows using inline styles in HTML?

To create a zebra-striped table using inline ...READ MORE

answered Mar 24 in HTML by anonymous
63 views
0 votes
1 answer

How can I override Bootstrap CSS styles?

You can override Bootstrap CSS styles using ...READ MORE

answered Mar 24 in Node-js by anonymous
49 views
0 votes
1 answer
0 votes
1 answer

How to Center a Single-Column Div Within a 12-Column Container in Bootstrap 3?

Using Bootstrap's Offset Classes Bootstrap 3 provides offset ...READ MORE

answered Mar 11 in Node-js by Tanvi
68 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP