Utilize Foundation Flex Grid to ensure that Column fills the entire height available

I am currently working on coding a page layout that resembles the design showcased in this CodePen example. The main container is set to occupy the entire height of the browser screen (100% height), with two child div elements each occupying 12 columns.

The first column has a predetermined height, while I am seeking a solution for the second column to fill the remaining vertical space within the container. Setting the height of the second column to 100% results in it taking up the full height of its parent container rather than adjusting to the available space, leading to the same height as the parent container. Is there a method to ensure that the second column fills the remaining vertical space?

UPDATE: It should be noted that the height of the first column can vary and is not fixed.

Answer №1

In the scenario where the parent container has a height: 100%, and one of its child elements has a height: 100px...

If you then assign another child element a height: 100%, it will overflow the container because its sibling has already taken up 100 pixels.

To put it simply:

100% + 100px > 100%

Instead of using this approach:

.box-two {
  background: red;
  height: 100%;
}

Consider trying this alternative:

.box-two {
  background: red;
  height: calc(100% - 100px);
}

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

transform input in bootstrap to behave like a hyperlink in text format

Upon examining this code snippet you may notice that C appears to be positioned further to the right compared to the other buttons. While this issue is not as pronounced on my actual website, there still seems to be an unnecessary gap that I find bothers ...

Styling Ion-Slides in Ionic 3 with Inline CSS

On the main page of my Ionic3 App, I have an ion-slides component. <ion-slides pager> <ion-slide *ngFor="let blog of blogs | async" > <h2>{{ blog.title }}</h2> <p> <a target="_blank" class="slider-rea ...

Navigate to a particular row in jsgrid

I've implemented JS Grid for rendering data in a grid view from . The grid I'm using has multiple pages. I need to navigate to the page that includes the newly inserted row and highlight it after insertion. Is there an option in jsgrid that allo ...

The functionality of HTML5 Camera is experiencing issues while being used with Tomcat7

My Angular2 project includes HTML5 camera access functionality. I launch the project using Angular CLI (ng serve), which starts the web container for testing purposes. When trying to access the camera, the browser prompts me for permission. Once granted, e ...

When using Angular with mdbootstrap, the mdb-tabs directive will move to the end if the ngIf condition is true

Currently facing a challenge with a significant amount of code here. It is referenced as follows: "ng-uikit-pro-standard": "file:ng-uikit-pro-standard-8.3.0.tgz", I am attempting to display a tab between 1 and 3 if a certain condition ...

The hyperlink appears to be malfunctioning with an additional border surrounding it within a pop-up window

I am facing an issue with a link <a> not functioning properly with a popup dialog on . Additionally, there seems to be a border that appears around the <a> when the popup initially displays. If you click on "Leer más" for any product, you can ...

HTML Grid of widgets placed on top of content without obstructing it

This is a complex scenario that requires some patience to explain. My goal is to create a grid of widgets that can be dynamically displayed and positioned relative to the main page content. These widgets need to interact with the user as well as the conte ...

The Bootstrap 4 Dropdown Menu is positioned on the right side of its parent element

Just started using Bootstrap and have a query regarding my Navbar design. Check out my trial website at TEST-DOMAIN Currently utilizing Bootstrap 4.3.1 along with JQuery 3.4.1. The menu looks perfect on Desktop view. The dropdown displays as expected. I ...

TinyMCE generates HTML code with embedded tags

Hey there, I'm currently facing an issue with TinyMCE that I just can't seem to solve. I've browsed through some related posts but haven't found a solution that works for me... For example: When I input something in my back office, ...

Enabling users to modify or make changes to an HTML table

I currently have an HTML table that displays database information from MySQL: pkg | kod | sek | tahun | makmal | cat | bil | Netbook | Bidor | aaa123 | aeu | 2012 | no | book | 100 | 150 | edit/delete Whenever a user clicks the ed ...

Form malfunctioning when utilizing dual submit buttons

I have created a form in my JSP page for a web application with text fields and two submit buttons: "send" and "search". I want the form to perform different actions based on which button is pressed, but currently both buttons trigger the same action. Can ...

Assigning a value using HTML code causes the input to malfunction

Trying to create a website with the goal of updating the database is proving to be challenging. The issue lies in the fact that some attributes from the database are in HTML format. Whenever I attempt to set an input's value to match the current attri ...

Prevent jQuery sortable from dropping into its initial parent

In a backbone view, I have multiple sortable lists that are connected to each other. this.$(".users:not('.client')").sortable({ connectWith: ".users:not('.client')", helper: 'clone', re ...

What is the best way to continuously run a re.search for new data?

I managed to extract two sets of data from an HTML table using regex expressions. Here is the extracted data: <div class = "info"> <div class="name"><td>random</td></div> <div class="hp"><td>123456</td&g ...

Using ASP.NET MVC to generate dynamic CSS styles

I am seeking a solution that will allow me to achieve the following objectives: Retrieve dynamically generated CSS from an action method Select a CSS file based on request parameters or cookies Utilize a tool for combining and compressing (minifying) CS ...

Dynamically transforming JSON data into an HTML table

I'm new to HTML and web development, and I'm trying to create a website where a server-side Python script returns JSON data that needs to be displayed in a table on the webpage. The structure of the JSON can vary each time, so the table must be d ...

The variable $ has not been defined in Jquery framework

<html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script type="text/javascript" src="deployJava.js"></script> <script type="text/javascr ...

The combination of CSS3's 100% height and flexible boxes is resulting in unexpected and erratic

I'm attempting to design a webpage without a scrollbar by utilizing CSS3 box-flex. This is my current code: <html> <body style="height:100%;display:-webkit-box;-webkit-box-orient:vertical;"> <!-- height set to 1000px --> <div sty ...

Clearing Up CSS Height Definitions

Based on my observations from other posts, it seems that to establish the height of an element in percentages or pixels, etc., the parent element's height also needs to be explicitly defined. This implies that the height settings must be specified all ...

What steps can I take to add a horizontal scroll bar and view the entirety of my image?

<img src="the fake.png" width="3268" height="538" class="table" alt=""/> I have a large image that is getting cut off on the page. I need to add a horizontal scrollbar so I can view the entire image ...