There appears to be an additional space within the content-box of the HTML image

Check out the issue here

After using bootstrap, I noticed that images were creating extra space within the content-box. I tried various properties but none seemed to work for me.

This problem only occurs when the max-width is set at 992px.

 <section class="page-section mb-0" id="about">
  <div class="container">
    <!-- About Section Heading-->
    <h2 class="page-section-heading text-center">
      About
    </h2>
    <!-- Divider-->
    <div class="divider-custom divider-light">
      <div class="divider-custom-line"></div>
    </div>
    <!-- About Section Content-->
    <div class="row">
      <div class="col-lg-4 ml-auto">
        <img class="demo" src="assets/img/demo.jpg" alt="image" />
      </div>
      <div class="col-lg-4 mr-auto">
        <p class="lead">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia neque assumenda ipsam nihil, molestias magnam, recusandae quos quis inventore quisquam velit asperiores, vitae? Reprehenderit soluta, eos quod consequuntur itaque. Nam.
        </p>
      </div>
    </div>
  </div>
</section>

Answer №1

It's difficult to provide a definitive solution without seeing the code in question, but one possible remedy could be:

div {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

When using the `display: block;` property within a `code` tag nested inside a `pre` tag, it results in unexpected line breaks and incomplete styling when scrolling

I am trying to create a zebra striped code sample using HTML and CSS. However, when I run the code snippet below, it adds unwanted new lines and does not apply the styling properly when using the scroll bar. How can I resolve this issue? <!DOCTYPE h ...

Is IE8 compatible with HTML5 and CSS3?

My client has requested their website to be developed using HTML5 and CSS3. However, it has come to my attention that IE6 and IE7 do not have full support for HTML5 and CSS3. The client claims that IE8 does support these technologies, but I need more inf ...

The dropdown menu is not able to retrieve information from the secondary database

I have been encountering multiple challenges while working on a web-based dynamic form that I am developing. My current major issue is with populating the second #bodytype dropdown based on the selection made in the first, #bodyman, dropdown. Subsequently ...

A stationary division containing scrollable content

I feel like I'm losing my mind... Trying to achieve the following: a fixed div that always stays visible on the page. Sounds simple enough, but within this div, I need to add content that will scroll along with the rest of the site. Keep in mind, thi ...

Spinning triangle around central point using CSS

I'm working on a project that includes the following code snippet: body { background-color: #312a50; font-family: Helvetica Neue; color: white; } html, body { height: 100%; } .main { height: 100%; width: 100%; display: table; } .wr ...

Height of input-group-append and prepend in Bootstrap 4.0 is displayed incorrectly

Currently utilizing Bootstrap 4 and encountering an issue that I can't seem to resolve. The height of the input-group-append and input-group-prepend elements increases when screen resolution is decreased. You can view the problem in the following anim ...

Resizing body div to fit screen in iOS using Xcode for Cordova/PhoneGap

Just delved into the world of cordova/phonegap and managed to create my inaugural app. It's a work in progress, but I've hit a roadblock that I am struggling to navigate. During testing on both the simulator and actual device, I noticed some bla ...

Placing HTML elements inside of the <code> tag is a common practice

After spending years working on backend technologies like PHP and C#, I am now diving back into front-end development. To enhance my understanding of Bootstrap, I am creating my own local reference page where I can easily access the widgets generated to di ...

Blurred border encircling a CSS circle styled with overflow: hidden;

Take a look at the JSFIDDLE of my cat animation without any drop-shadows to highlight the issue clearly. The problem appears to be related to the use of border-radius and possibly due to overflow: hidden. Just to clarify, the owl is not the focus of this ...

adaptive layout showcasing a mix of images in varying sizes that accurately reflect real-life proportions and scales

My Laravel site is having an issue with inconsistently scaled product images loaded into a grid-container--fit row through a @foreach loop. The images vary in sizes and orientations, causing them to be scaled unevenly when displayed on the responsive grid. ...

"Revamping Your Design: The Power of Angular 4

I am working with two different layouts in my project: <div *ngIf="!loginPanel" class="login1"> <a (click)="showLoginPanel()">Login</a> </div> <div *ngIf="loginPanel" class="login2"> <input type="text" placeholder="user ...

Sound continues playing even when iPad browser safari is minimized

While working on a game developed in html5, jQuery, and Javascript, I am facing an issue with preloading multiple audio files. The audios play sequentially, but when I minimize the iPad, the audio continues to play. Can anyone assist me in pausing the au ...

Is there a way for me to determine when my web browser has completed loading the entire page?

Similar Question: How to Detect When a WebBrowser Has Finished Loading a Page Is there a way to determine if my web browser has completed loading all content on the page? In C#, is it possible to display multiple pages in sequence without allowing na ...

Managing the AJAX response from a remote CGI script

I'm currently working on a project that involves handling the response of a CGI script located on a remote machine within a PHP generated HTML page on an apache server. The challenge I am facing relates to user authentication and account creation for ...

Animate.css does not function properly when loaded locally

I'm currently using a Flask server to host an HTML file for testing purposes. Within the head of this HTML file, I have linked to a locally stored animate.min.css file (<link rel="stylesheet" type="text/css" href="{{ url_fo ...

Display or conceal elements using Jquery based on radio button selection

Recently delved into JQuery and encountered a frustrating issue that I can't seem to resolve. I'm certain it's a simple fix, but despite researching similar questions with solutions, I'm still stuck... The problem arises when attemptin ...

Troubleshooting why PHP HTML5 contact form is failing to send emails

I am facing an issue and struggling to determine whether it is related to my PHP code or the server configuration. My problem lies with a contact form named 'contact.php' which contains both HTML and PHP code on the same page. Despite reviewing ...

Pressing the button inside the iframe will cause the div to appear in the parent

I have a button in my iframe that opens a div on the same page: <li> <input type='button' id='hideshow2' class='radiobutton' value='Core' onclick="showDiv('#content2')"> </li> <di ...

"Create a sleek underline effect for a Bootstrap 4

Can someone please assist me with an issue I'm facing? The underline in my navbar is not working as expected. Here are my HTML and CSS files: https://jsfiddle.net/57fd6yf5/1/ I am trying to make the cursor activate underlining only under the menu item ...

Reorder HTML elements based on the size of the screen

Is it possible to modify the order of HTML elements based on screen size? For instance, on larger screens such as desktops, the order should be: element1 element2 element3 However, when viewed on a phone, this layout doesn't fit the screen width. ...