CSS - Ensuring a 100% height div maintains its content structure even when the window is resized

I have three divs all set to 100% height in order to create a block scroll effect. One of these divs contains text. The issue arises when I resize the window width and the text starts to overlap from the bottom. I want the div height to stretch further to prevent this overlapping from happening. HTML Code:

<div class="wrapper">
    <div class="company" id="company">
        <div id="carousel" class="carousel slide" data-ride="carousel">
            <!-- Carousel indicators -->
            <ol class="carousel-indicators">
                <li data-target="#carousel" data-slide-to="0" class="active"></li>
                <li data-target="#carousel" data-slide-to="1"></li>
                <li data-target="#carousel" data-slide-to="2"></li>
            </ol>   
            <div class="carousel-inner">
                <div class="item active">
                    <img src="/dev/images/example.png" alt="First Slide">
                    <div class="carousel-caption">
                        <h3>Caption title 1</h3>
                        <p>Caption text 1</p>
                    </div>
                </div>
                <div class="item">
                    <img src="/dev/images/example.png" alt="Second Slide">
                    <div class="carousel-caption">
                        <h3>Caption title 2</h3>
                        <p>Caption text 2</p>
                    </div>
                </div>
                <div class="item">
                    <img src="/dev/images/example.png" alt="Third Slide">
                    <div class="carousel-caption">
                        <h3>Caption title 3</h3>
                        <p>Caption text 3</p>
                    </div>
                </div>
            </div>
            <a class="carousel-control left" href="#carousel" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left"></span>
            </a>
            <a class="carousel-control right" href="#carousel" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right"></span>
            </a>
        </div>
        <div class="container-fluid">
            <h1>Dynavio</h1>
            <p>Dynavio is a company that specializes in automation</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla dignissim ex. Curabitur eu purus non turpis consequat gravida et ut velit. Praesent semper orci est, vel rutrum enim laoreet sed. Donec commodo velit in elit viverra aliquam. Mauris accumsan lorem ante, ut elementum massa vestibulum vitae. Quisque faucibus, lorem quis vulputate tincidunt, sapien mi volutpat dui, nec interdum nisl elit ut turpis. Integer consectetur dui volutpat justo volutpat, ut rhoncus arcu accumsan. Sed aliquet venenatis felis, vitae feugiat nibh venenatis vel. Sed id dui quis odio suscipit rutrum at vel velit.</p>
            <h1>Members</h1>
            <img src="/dev/images/olanigan.jpg" data-toggle="tooltip" data-placement="top" title="Ibrahim Olanigan" class="img-circle member-image cursor-pointer">
        </div>
    </div>
</div>

CSS Code:

.wrapper {
    border-bottom: 1px solid #D9D9D9;
    min-height: 100%;
}
.company {
    padding-bottom: 10px;
    height: 100%;
}

JSFiddle Link: https://jsfiddle.net/r90sdk6g/

Answer №1

It was a pleasant surprise to discover that the solution simply required deleting height: 100%; from the .business class.

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

Is it possible to utilize checkbox images for type="checkbox" in ng-repeat with AngularJS?

Hi there, I'm currently attempting to add a checkbox image for input type="checkbox" using ng-repeat. I've styled everything accordingly, but when I apply ng-repeat, it only works for the first item in the list. Here is what my CSS file looks lik ...

Steps for extracting HTML content from a beautiful soup object

My current situation involves a bs4 object listing: >>> listing <div class="listingHeader"> <h2> .... >>> type(listing) <class 'bs4.element.Tag'> I am aiming to retrieve the raw html as a string. Initially, ...

Inconsistency in css asset URLs across various pages discovered while working with Rails

When using assets stylesheet to load a CSS file, I noticed that it only loads on the index page. Upon inspecting with F12, the console shows the URL for other pages as well, which appends "/cloths" to the asset path. I am currently utilizing the default la ...

Changing the CSS of ng-view when triggering CSS in ng-include: A step-by-step guide

Incorporating my left-hand, vertical navbar into the page using ng-include, I've managed to make it expand right on hover. Each page is enclosed within a <div class="wrapper">. My goal is to adjust the margin of each wrapper as the navbar expan ...

Generating a div element within another div element

I have been attempting to add a new div inside an existing one using append, after, etc., but so far I have not been successful. The structure of the code is as follows: <div class="row"> <div class="col-xs-12" id="element-container"> &l ...

Using jQuery, set a restriction on the total number of options in three dropdown menus to

I am currently facing a challenge with 3 dropdowns, each containing 8 options. My aim is to restrict the total selection across all three dropdowns to 8. For instance, if I choose 7 in the first dropdown, I should only be able to pick 1 in the next two. Si ...

Switching HTML text by clicking or tapping on it

I'm currently working on a website that will showcase lengthy paragraphs containing complicated internal references to other parts of the text. For instance, an excerpt from the original content may read: "...as discussed in paragraph (a) of section ...

Showing a DIV container upon hovering over a different element

Having trouble with a hidden div container not displaying properly upon hovering over a visible div container. When d1 is hovered over, d2 appears but with a blinking effect. Here is my code: Note: I want d1 to remain visible and use d2 for displaying te ...

what is the advantage of utilizing negative margins?

Examining some CSS code and came across this: .head{ position:relative; overflow:hidden; margin:-30px 0 0 -25px; width:820px; padding:20px 25px 0 25px; background:url(/images/bkg.gif) 0 0 no-repeat; } What's the reason behind using -30px and -25px m ...

Issue with styled-components not being exported

Issue: ./src/card.js There was an import error: 'Bottom' is not exported from './styles/cards.style'. card.js import React from 'react' import { Bottom, Color, Text, Image } from "./styles/cards.style"; fu ...

What is the best way to assign a dynamic width to a block element?

In my project, I am working with 30 elements that have the class .lollipop and are styled with line-height: 30px; height: 30px;. <a class="lollipop">Random text</a> <a class="lollipop">Random text longer</a> <a class="lollipop"& ...

CSS Dialect Debate: Container or Wrapper - Which is the Best Term to

Can you explain the distinction between a container and a wrapper, as well as their respective meanings? ...

The title attribute in Vue3 is updated through props, but computed properties remain unaffected

I incorporated an external library into my project using Vue3. The component I am utilizing is sourced from a third-party library [Edit: Upon realizing that the GitHub repository for this library is no longer being maintained, I have updated the code to re ...

The high chart data is failing to load

I am brand new to highchart and have just started learning how to create a simple pie chart in HTML. Unfortunately, I am having trouble getting it to work properly. Everything seems correct to me, but for some reason, the highchart is not populating. Here ...

When you include ng-href in a button using AngularJS, it causes a shift in the alignment of the text within the button

Recently, I've been delving into Angularjs with angular-material and encountered a slight issue with ng-href. I created a Toolbar at the top of my webpage, but the moment I include the "ng-href" attribute to a button, the text inside the Button loses ...

Refine the table by selecting rows that contain a specific value in the href attribute of the <a> tag, and display the parent row when the child row

I've been working on filtering and searching the table below based on the href value. My code successfully filters the displayed columns in the table, but it fails to work when I search for a string within the href attribute. For instance, if I searc ...

Differences in font sizes across various browsers on Mac devices

In the given scenario, a navigation bar is displayed. The elements of this navigation bar have varying widths, but when combined together, their total width matches that of their container element, which is the ul. The problem arises when viewing the navig ...

The motion does not adhere to the delay in transition

How come the first animation doesn't have a delay when hovering in and out? It just disappears instantly. I'm attempting to achieve a delay similar to the hue-rotate effect when hovering in and out. https://jsfiddle.net/u7m1Ldq6/15/ <div id ...

Angular has trouble displaying information across multiple HTML files

I have created an HTML file to display some data. The initial HTML file named disc-log.html looks like this: <div> <h2>Discs</h2> <jhi-alert></jhi-alert> <div class="container-fluid"> <div class=" ...

"Troubleshooting: Spring Boot application fails to load

I recently added some bootstrap templates to my resources/templates folder. However, when I start the server and navigate to the URL where I linked the index.html page, the bootstrap styling is not loading. Surprisingly, when I use the Chrome button in Int ...