Overlap in Bootstrap 4 Sections

I'm facing an issue with two sections on my website. They are properly separated until a certain size, https://i.sstatic.net/e52t2.png, but when the size is reduced, they start to overlap https://i.sstatic.net/aMtHr.png. Below is a snippet of my code:

.home-inner {
height: 100vh;
width: 100vw;
background-image: url('../img/bg.jpg');
background-position: center;
background-size: cover;
background-repeat: no-repeat;}

.caption {
width: 100%;
max-width: 100%;
position: absolute;
top: 38%;
z-index: 1;
text-transform: uppercase;}


<section id="inicio">
    <div class="landing">
    <div class="home-wrap">
        <div class="home-inner">
        </div>
    </div>
    </div>

<div class="caption text-center">
    <h1>Title</h1>
    <h3>Sub title</h3>
    <a href="index.html" class="btn btn-outline-light btn-lg">VER PRODUCTOS</a>
</div>



</div>
</section>

<section class="qsomos">
<div id="bio" class="container-fluid">
    <div class="row justify-content-center align-items-center">
        <div class="col-lg-5 col-xs-3 mx-auto">
            <h2>TÍTULO</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
            tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
            quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
            consequat. <br>Duis aute irure dolor in reprehenderit in voluptate velit esse
            cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
            proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>..........

The images demonstrate the issue I am encountering. I am relatively new to web development and would appreciate any assistance in resolving this straightforward problem.

Answer №1

To make your website responsive, you should incorporate media queries into your CSS. These queries allow you to customize your CSS based on the device or screen size, ensuring that your HTML content adapts accordingly.

For more information on how to use media queries effectively, check out this resource:

https://www.w3schools.com/css/css_rwd_mediaqueries.asp

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

Troubles arise when hovering over the <strong> tag and the <h4> element

While hovering over my h4 tag in the table, everything functions correctly. However, when I hover over the strong tag inside the h4 element, the strong tag inherits the same hover effect as the h4 tag. The structure of each td element within the table is ...

The transition from Vuetify 2 to Vuetify 3 involves replacing deprecated properties like app, clipped-left, and offset-y with the new property called "

Seeking guidance on upgrading from Vuetify/Vue 2 to 3. As a non front-end developer tasked with updating legacy code, I'm facing challenges due to the migration guide assuming CSS knowledge and lacking examples for resolving removed features. The gui ...

Issue encountered while retrieving the initial element using .parent().search('img').eq(0)

I'm trying to extract an 'img' element inside an 'a' tag, but unfortunately, I'm having trouble achieving this. Here is the HTML code: <table class="table table-bordered"> <thead> <tr> ...

extracting data from a div while presenting a confirmation pop-up

I am attempting to extract information from a file on the following website. Specifically, I am trying to download an Excel sheet containing a complete directory of towns in TRIPURA, listed as the first item in grid format. Here is the code snippet I am ...

Alignment of checkboxes and labels in a vertical manner

I have been browsing through various posts on Stack Overflow regarding this issue, but I haven't found a solution that works for me yet. I've tried using the following CSS code to vertically align checkboxes and their labels: body { font-fam ...

Parsing HTML in Python 3: A Guide to Extracting Information

Trying to extract text from a webpage using Python 3.3 and then search for specific strings within that text. When a matching string is found, the goal is to store the subsequent text. For instance, taking this page as an example: and I need to preserve ...

Is there a way to combine the input tag's name with a growing integer variable?

Within a while loop, I need to modify the names of input tags by concatenating them with an increasing integer variable. However, attempts to use the $ symbol have not yielded successful results. <html> <head> <meta http-equiv="Content- ...

Adjustable text size to accommodate different cultural changes

My team is working on an MVC web application, with CSS stylesheets utilized in views. We are trying to achieve the following scenario: Whenever the language culture changes from English to another language, we want the font size of a specific class to ...

Set up bootstrap 5 on your website while incorporating the beloved color scheme of bootstrap

Bootstrap has introduced new color schemes in version 5 compared to version 4. Is it possible to update to Bootstrap 5 while retaining the original color palette of Bootstrap 4 without the need for manual file adjustments? Are there any content delivery ...

Tips for changing the display of input type submit value on hover using CSS in a React Component

I need help with a form that has an <input type="submit" element where the value is set dynamically based on currIntValue. My goal is to change the displayed value to 'Search' when hovering over the input, instead of showing currIntValue. I ...

Updating values in MySQL using PHP requires two consecutive reloads

Hey there! I recently created a message deletion button, but for some reason, it takes two reloads to see the changes pop up. The rest of my code is working fine, so I won't be sharing that part here... <?php while($r = $replies->fet ...

Tips for activating scroll feature for certain section of an HTML page

For the styling of my page, I'm utilizing Scss and am facing an issue related to setting up scrolling for specific sections of an HTML page. You can check out the image reference here. During a scroll event, I want to ensure that the Categories (left ...

The functionality of the Bootstrap dropdown or radio input type is not functioning correctly

I'm currently utilizing electron([email protected]) along with bootstrap([email protected]). Whenever I attempt to incorporate a dropdown or other components from Bootstrap, they simply do not function. I am unsure of what mistake I might ha ...

Issues with padding and margin on iOS devices

On my iPhone (iPhone 6, iOS 8), I noticed that the loader is positioned slightly above the button. However, when I use the Chrome mobile emulator, I can't see this issue. I'm puzzled about how to resolve it. What do you think could be causing thi ...

The MIME type 'text/html' is incompatible with stylesheet MIME type and is not supported

I have exhausted all possible solutions for the issue, from specifying the type for <link rel="stylesheet" href="./style.css" /> to using app.use(express.static('public')), but unfortunately, none of them seem to resolve the problem. index ...

What is the best way to smoothly hide and reveal a flex child element?

I am looking to create a flex container where the child element can smoothly animate to shrink and grow, while the remaining child elements expand to fill in the space. The method I have found involves setting the max-width to 0px and the borders' wi ...

Trouble with Bootstrap Popover's visibility

My current setup involves a popover that is not initializing properly. The code I am using is shown below: HTML: <div data-toggle="popover" data-placement="bottom" data-content="xyz">...</div> JavaScript: $(function () { $('[data-t ...

Implementing both inset and external box shadows on the same div element

Is it possible to apply both inner and outer box shadow to the same div element? I've attempted it but it doesn't seem to be working as expected. http://jsfiddle.net/CWuw8/ div{ top: 100px; position: absolute; left: 100px; hei ...

The mobile version of the page has extra white space at the bottom

I have a responsive design that is working well, but I am experiencing an issue on mobile devices where there is white space at the bottom of the page. * { margin: 0; padding: 0; box-sizing: border-box; } html { scroll-behavior: smooth; ...

Only the first cell is affected by the background color setting

... <th style='background-color:#cccccc;font-weight:bold'><td></td><td>Address</td><td>Last Name</td><td>First Name</td><td>ZIP Code</td><td>City</td></th> ...