display complete map using full height in a bootstrap 4 row

Struggling to get the map in this column to fill the entire height within a Bootstrap4 column.

After attempting to add h-100 to the row, scroll bars appeared at the bottom of the map and the bottom 10% of the page went missing.

https://i.sstatic.net/epfxW.jpg

The code snippet for the layout is:

   <div class="row h-100">
    <div id="leftPanel" class="col-sm-2">
        <table id="tasklist" class="table table-sm">
            <thead>
                <tr>
                    <th>Time</th>
                    <th>District</th>
                    <th>Activity</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>12/12/19 08:00</td>
                    <td>ACD</td>
                    <td><a href="#">3F schools</a></td>
                    </a>
                </tr>
                <tr>
                    <td>13/12/19 19:30</td>
                    <td>WMD</td>
                    <td><a href="#">3T Burbank St</a></td>
                </tr>
            </tbody>
        </table>
    </div>
    <div id="viewDiv" class="col-sm-10">
    </div>
 </div>

In the provided fiddle, the row height adjusts based on the number of rows in the left column div.

Check out the Fiddle here.

Seeking guidance on how to make the map occupy the entire right column without triggering scroll bars.

Answer №1

To achieve the desired effect, consider incorporating the height property with the following specification:

height: calc(100vh - 56px);

The 56px represents the height of your topbar, and it is essential to deduct this value from the total map height for accurate display.

Answer №2

  1. To achieve full width, I included container-fluid.
  2. The left panel is given the class col-md-3, while the map view is assigned col-md-9.
  3. For #viewDiv, set the height to 700px. Attempted setting height:100% did not work as expected, providing only pixel values.

     <nav class="navbar navbar-expand-sm bg-dark navbar-dark">
       <a class="navbar-brand" href="#">Map</a>
     </nav>
    
     <div class="container-fluid">
    
      <div class="row">
        <div id="leftPanel" class="col-md-3">
            <table id="tasklist" class="table table-sm">
                <thead>
                    <tr>
                        <th>Time</th>
                        <th>Area</th>
                        <th>Activity</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>12/12/19 08:00</td>
                        <td>CD</td>
                        <td><a href="#">schools</a></td>
                    </tr>
                    <tr>
                        <td>13/12/19 19:30</td>
                        <td>MD</td>
                        <td><a href="#">Burbank St</a></td>
                    </tr>
                    <tr>
                        <td>13/12/19 21:00</td>
                        <td>CM</td>
                        <td><a href="#">Westfield</a></td>
                    </tr>
                    <tr>
                        <td>15/12/19 15:30</td>
                        <td>CM</td>
                        <td><a href="#">Langiola</a></td>
                    </tr>
                </tbody>
            </table>
        </div>
    
      <style>
       #viewDiv{ height:700px; }
      </style>
      <div id="viewDiv" class="col-md-9"></div>
    
      </div><!--end row-->
    
    </div><!--end container-->
    

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

Error message: Unable to access the state property of an undefined object

I've been attempting to integrate a react sticky header into my stepper component. However, I've encountered an issue where it doesn't render when added inside my App.js file. As a result, I've started debugging the code within App.js ...

Using PHP to utilize logical OR or AND operators when adding a class to the global navigation's list items

I am currently working on implementing a global navigation bar using PHP on all pages. The PHP code is also being used to add a class and display the current page. The main challenge I am encountering involves selecting the parent navigation item. When on ...

Having trouble with Javascript not detecting when it's empty?

Recently, I have been attempting to modify the color of a submit button when a form is empty. As a beginner in this area, I am somewhat puzzled as to what mistake I might be making. I will share the current code with you in hopes of receiving some guidance ...

What is the best way to send an observable with parameters through @Input?

The objective is to transfer an http request from Component 1 to Component 2 and initialize its parameters on Component 2. Here is a pseudo code representation of my approach: Component 1 HTML <app-component-2 [obs]="obs"></app-component-1> ...

Change the dropdown header behavior from hovering over it to clicking on it

This snippet of code is integrated into our header to showcase the cart. Currently, the dropdown appears when hovering over it. Is there a way to adjust this so that the dropdown shows up when onclick? <a href="#header-cart" class="skip-link skip-cart ...

I'm new to this, but can someone explain why I'm being redirected to the register_db.php page when I click on the register button?

Why when I click the register button, it redirects me to the register_db.php page instead of sending the data to the database and keeping me on the same register.php page? I want the data to be sent to the database without changing the webpage. register.p ...

There seems to be a Javascript TypeError occurring - it looks like the function document.routeEvent

I am currently working on an old webpage that contains JavaScript. However, there is a function that does not seem to work properly with newer browsers such as Mozilla, Chrome, and Safari. Interestingly, the page functions perfectly fine on Internet Explor ...

The AddClass function fails to function properly after an ajax form is submitted

I am facing a challenge in setting up validation for my ajax form. My goal is to have a red border appear around the input field if it is submitted empty. Unfortunately, when I try to use addClass(), it does not seem to have any effect. The alert message ...

Achieving a full width vertical navigation on the left side using Bootstrap's grid system: a step-by

I am looking to design an admin panel using bootstrap. To start off, I want to create a navigation menu on the left side. However, I encountered an issue where my navigation menu with a red background does not stretch the full width of the left column. Her ...

Spread out elements equally into columns

I am facing a challenge with arranging items within a single div called .wrap. The goal is to place an unknown number of items (.thing) into four columns, stacked on top of each other. <div class="wrap"> <div class="thing"> thing1 </div ...

Center-aligned navigation bar with all elements except for one positioned on the right side

Currently, I am attempting to center 4 elements next to each other while having one element float to the right using a flex-based solution. The ideal outcome would be for the floated element to remain in place when resizing the browser, with the other 4 e ...

How to properly size a child div inside a parent container

I'm having trouble with sizing a child div inside a parent div. The problem is that the child div's size changes according to the number of elements it contains, but I want all the child divs to be the same size regardless. This issue arises with ...

The CSS style tag does not function in Safari

I am trying to dynamically load background images using CSS based on the display resolution using the @media keyword. This method works perfectly in Firefox and Chrome, but unfortunately, it does not seem to work in Safari. Is there something I might be ...

Expanding div that adjusts to content size and expands to fit entire page

Appreciate your help. I'm currently facing an issue with the "content" and "footer" sections within the "wrapper" element. Below are the styles for these elements: #content { width: 100%; min-height: 100%; position: relative; background- ...

CSS shrink effect upon hovering

I'm currently working on designing a menu using <ul>/<li> tags along with CSS styles. Here's the progress I've made so far with my menu design: https://jsfiddle.net/gANfS/6/ However, I encountered an issue where if you hover ov ...

Tips for displaying all 'ul li' lists in media queries to ensure responsiveness in design

When I view my navigation bar snippet on desktop mode, it displays all the list items. However, when I adjust the browser width to fit my media queries, only the Home list is shown in the nav bar. Here's an example of the issue: Before Clicking the ...

Sass: Overcoming the challenge of the IE limitation on 4095 selectors per stylesheet

Hey there! Are you working on a Rails project with Sass & Compass? If you're using the Rails Asset Pipeline, check out this question. We're in the process of developing a large application with multiple use cases and various individually styled ...

Dynamic React animation with sliding elements

When jumping between the second and third "page" of content, I am unable to determine the reason why it is happening. The content is displayed as an absolute position. Check out the sandbox here: https://codesandbox.io/s/nostalgic-bhabha-d1dloy?file=/src ...

What is causing my 100% height to be excessively large?

I'm facing an issue with my background containers, "background-overlay" and "background-gradient", as they are extending the height of the document beyond the actual content displayed. I am unsure of what could be causing this problem. It might be som ...

Controlling Javascript events

Currently, I am working on implementing an in-place editor using jQuery. The functionality is such that when you click on the text you wish to edit, it will replace the content with an input field, specifically a select tag. Everything seems to be functio ...