Adaptable Div Height in Bootstrap 4

Trying to recreate a WordPress page with bootstrap. The original page looks like this: https://i.sstatic.net/FRCkD.jpg

However, my version looks like this:

https://i.sstatic.net/2XLDe.jpg

I want to remove unnecessary white space below the form. Here is my current code:

<div class="container-login100">
    
    <div class="wrap-login100 ">
    <span class="login100-form-title p-b-32">
                    Make Fast Cash Anywhere
    </span>
    
    <span class="login100-form-sub-title p-b-32">
                    Begin Your Fast Start Steps Below...
    </span>
    
    <div class="test-progress" style="background-color:#ebebeb;">
        <div class="progress-bar progress-bar-success  progress-bar-animated" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width:4%; background-color:#00c479;"><span id="progress">&nbsp;&nbsp;0% </span></div>
    </div>
    
        <form class="login100-form">
            
            <div id="quiz">
          
                <div class="question">
                    <h3>
                    <span id="question"> Are you looking for a way to make money online?</span>
                    </h3>
                </div>
               <ul class="text-center" style="list-style-position: inside">
                  <li>
                    <input type="radio" id="a-option" name="selector" value="1">
                    <label for="a-option" class="element-animation">Yes</label>
                    <div class="check"></div>
                  </li>
                  
                 
                  
                  <li>
                    <input type="radio" id="b-option" name="selector" value="3">
                    <label for="b-option" class="element-animation">No</label>
                    <div class="check"><div class="inside"></div></div>
                  </li>
                  
                  <li id="lic" style="display:none">
                    <input type="radio" id="c-option" name="selector" value="3">
                    <label for="c-option" class="element-animation">C</label>
                    <div class="check"><div class="inside"></div></div>
                  </li>
                  
                  <li id="lid" style="display:none">
                    <input type="radio" id="d-option" name="selector" value="3">
                    <label for="d-option" class="element-animation">D</label>
                    <div class="check"><div class="inside"></div></div>
                  </li>
                </ul>
                
            </div>

        </form>
    </div>
</div>

The CSS code I'm using is as follows:

.limiter {
  width: 100%;
  margin: 0 auto;
  background-color: #000000;
}

.container-login100 {
  width: 100%;  
  min-height: 100vh;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: top;
  padding: 10px;
  background-image: url("../images/dollar-2.jpg");
  background-color: #ebebeb;
}


.wrap-login100 {
  
  width: 570px;
  background: #fff;
  border-radius: 10px;
  position: relative;
}

I am using Bootstrap 4 and seeking a responsive height for wrap-login100 rather than full height. If anyone can help achieve this, it would be greatly appreciated. Thank you!

Edit: removing min-height: 100vh; from container-login100 makes it responsive, but the background gets cut off and only visible on half the screen.

Answer №1

To enhance the layout, include height:max-content in the CSS file for .wrap-login100

.limiter {
  width: 100%;
  margin: 0 auto;
  background-color: #000000;
}

.container-login100 {
  width: 100%;
  min-height: 100vh;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: top;
  padding: 10px;
  background-image: url("../images/dollar-2.jpg");
  background-color: #ebebeb;
}

.wrap-login100 {
  width: 570px;
  background: #fff;
  border-radius: 10px;
  position: relative;
  height: max-content;
}
<div class="container-login100">
  <div class="wrap-login100 ">
    <span class="login100-form-title p-b-32">
       Make Fast Cash Anywhere
    </span>
    <span class="login100-form-sub-title p-b-32">
       Begin Your Fast Start Steps Below...
    </span>
    <div class="test-progress" style="background-color:#ebebeb;">
      <div class="progress-bar progress-bar-success  progress-bar-animated" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width:4%; background-color:#00c479;"><span id="progress">&nbsp;&nbsp;0% </span></div>
    </div>
    <form class="login100-form">
      <div id="quiz">
        <div class="question">
          <h3>
            <span id="question"> Are you looking for a way to make money online?</span>
          </h3>
        </div>
        <ul class="text-center" style="list-style-position: inside">
          <li>
            <input type="radio" id="a-option" name="selector" value="1">
            <label for="a-option" class="element-animation">Yes</label>
            <div class="check"></div>
          </li>
          <li>
            <input type="radio" id="b-option" name="selector" value="3">
            <label for="b-option" class="element-animation">No</label>
            <div class="check">
              <div class="inside"></div>
            </div>
          </li>
          <li id="lic" style="display:none">
            <input type="radio" id="c-option" name="selector" value="3">
            <label for="c-option" class="element-animation">C</label>
            <div class="check">
              <div class="inside"></div>
            </div>
          </li>
          <li id="lid" style="display:none">
            <input type="radio" id="d-option" name="selector" value="3">
            <label for="d-option" class="element-animation">D</label>
            <div class="check">
              <div class="inside"></div>
            </div>
          </li>
        </ul>
      </div>
    </form>
  </div>
</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to utilize the $spacer variables within Bootstrap 4.5?

Check out this snippet from Bootstrap's _variables.scss file, showcasing the $spacers code: $spacer: 1rem !default; $spacers: () !default; // stylelint-disable-next-line scss/dollar-variable-default $spacers: map-merge( ( 0: 0, 1: ($spacer * ...

Ways to display or conceal multiple div elements using JavaScript

A group of colleagues and I are currently collaborating on a project to create a website showcasing our research. We have incorporated 1 page that contains detailed descriptions of six different subjects: system biology, proteomics, genomics, transcripto ...

When using Tailwind CSS with flexbox, elements do not expand horizontally as expected

Is there a way to prevent the label from expanding along with the description in tailwindcss? <script src="https://cdn.tailwindcss.com"></script> <div class="flex items-center"> <div>block</div> <div class="m ...

Is it possible to alter the style of the <input type="file"> element?

After attempting to modify the HTML form input type file, here is the snippet of code I used: In HTML, within form id = form <input class="upload_file" type="file" id="file" name="file" /> .CSS I experimented with both approaches: .upload_button{ ...

How can one utilize JSON.parse directly within an HTML file in a Typescript/Angular environment, or alternatively, how to access JSON fields

Unable to find the answer I was looking for, I have decided to pose this question. In order to prevent duplicates in a map, I had to stringify the map key. However, I now need to extract and style the key's fields in an HTML file. Is there a solution ...

Verifying the scrollHeight of an element may occasionally result in a return value of 0

While working on a project, I encountered an issue with the scrollHeight of dynamically generated content. In some cases, the function to determine whether or not to include a "more" button in the content would return a value of 0 for scrollHeight, causing ...

Dynamic styles object for React components with inline styles

I have a styles object let styles = { step_div:{ height:'150px', } } I'm trying to display multiple div elements with different colors using React class Layout extends React.Component{ constructor(props) { super(props); ...

Numerous divs positioned above a myriad of images

Is there a way to create multiple images with a tag name overlaying each one as a link? I've been able to add a tag name on top of one image, but not on others. Every time I try to duplicate the div containing the image and tag, the tags do not show u ...

What is the best way to showcase the information stored in Firestore documents on HTML elements?

Currently in the process of designing a website to extract data from my firestore collection and exhibit each document alongside its corresponding fields. Below is the code snippet: <html> <!DOCTYPE html> <html lang="en"> <head> ...

Unlocking a targeted list in AngularJS

I have the following code snippet that I am using to implement ng-repeat in an Angular project. My goal is to display only the list item that I click on, but currently, when I click on the symbol ~, it displays all the lists. Is there a way to specify cer ...

What could be the reason for the text not showing up?

I'm currently working on developing a "MEME Generator" but I've hit a roadblock at this stage. Whenever I: upload > Enter Text > Submit All of the JavaScript changes revert back to the default state. It seems like I might be overlooking s ...

Problem occurs when tab links vanish after clicking on another part of the website

Exploring the world of Javascript as a newcomer has been quite an adventure, but I've encountered a hurdle with tab links on my website. Everything seems to be working fine – the links cycle through and display the correct content. However, when it ...

Tips on positioning the down arrow of an accordion-button to the left

I need to adjust the placement of the down arrow on an accordion button for my Arabic language website. Here is the current code snippet: <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-c ...

What is the best way to insert content using AJAX into a Twitter Bootstrap modal dialog box?

Currently, I am working with Zend Framework 2 and have been following a helpful tutorial on integrating form submission via AJAX. Instead of utilizing a jQuery UI modal, I have opted to use the modal provided by Twitter Bootstrap 3. My initial goal is to ...

Present the "Read more" button aligned with v-html content

I have some HTML content that I want to display using the v-html directive. The text is quite lengthy, so I am looking to add a clickable Read more link that appears on the same line as the text. The code structure would look like this: <div v-html=&qu ...

Position the image on the right side of several lines of text

My webpage contains two div elements: one for displaying multi-line text and the other for showing an image which is positioned to the right of the text. The width of the image is not fixed and can be adjusted using a user-defined parameter. <div> ...

Creating a checklist using HTML and CSS can be achieved by utilizing the <span> element and

I'm having trouble changing the color of a span box to red when I focus on a link. The span successfully changes color when activated, but nothing happens when I try to use the 'focus' pseudo-class. On click, different categories will displa ...

Choose the Nth option in the dropdown list using programming

Currently, I have a script that dynamically populates a select box with unknown values and quantities of items. I am looking to create another script that mimics the action of selecting the Nth item in that box. Despite my research, I have been unable to ...

What is the process for eliminating the message "Hello Member" on the Woocommerce Checkout page?

I've been struggling to remove a certain area on the checkout page without success. I attempted using this CSS code: .avada-myaccount-user-column .username { display:none; } https://i.stack.imgur.com/okFg9.png https://i.stack.imgur.com/GisRQ.png Cu ...

What is the best way to make the div inside the table cells expand to fill the available space?

I'm having trouble making the inner divs within table cell divs expand and fit their parent div without overlapping the next cell below it. Check out the sandbox for reference I've outlined the areas in grey where I want the cells to be filled. ...