What is the correct way to properly define the height of a page containing an angular-split area?

I am currently working on a page that utilizes angular-split. Here is a snippet of the code:

<div class="height-max">
  <app-nav-menu></app-nav-menu>
  <as-split direction="horizontal">
      <as-split-area>
        <router-outlet></router-outlet>
      </as-split-area>
      <as-split-area *ngIf="(contentSplitVisible | async)">
        <app-content></app-content>
      </as-split-area>
      <as-split-area *ngIf="(propertiesSplitVisible | async)">
        <app-properties></app-properties>
      </as-split-area>
  </as-split>
</div>

Additionally, the associated CSS code includes this:

.height-max 
{
  height: 100%;
}

In order to make the split gutters visible (you can check this here), I implemented the following change:

.height-max 
{
  height: 100%;
  overflow: hidden;
}

However, this adjustment brings about its own set of issues:

  • Some content may become unreachable
  • The gutter handle is not vertically centered

Unfortunately, I encountered a roadblock when attempting to apply the 'height-max' class to a specific div that wraps only 'as-split'. This method did not work as expected:

<div>
  <app-nav-menu></app-nav-menu>
  <div  class="height-max">
      <as-split direction="horizontal">
          <as-split-area>
            <router-outlet></router-outlet>
            ...

Could someone please advise on the correct approach to resolve this issue?

Answer №1

Feel free to experiment with

.height-max {
max-height: calc(100vh - 10px);
overflow: auto;
}

Answer №2

.as-horizontal .as-split-gutter {
    setting the height to auto is crucial!
}

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: TweenLite has not been recognized

/justincavery/pen/mPJadb - this is a link to CodePen After copying the code from CodePen and running it, I encountered an error: "Uncaught ReferenceError: TweenLite is not defined". The image only draws once and there is no animation unless I press "F5 ...

Ways to ensure the background color stretches the entire length of the page

I've been attempting to create a background image or color that extends across the entire main content area, but haven't had any success so far. For reference, please visit My attempts have involved adding a class called fill to the container-f ...

There is an error in the regular expression that has not been caught: the forward slash is

I have a TableCell with the following structure: <asp:TableCell CssClass="plusTd button" ID="plusCell"> </asp:TableCell> Then, I decided to add a property to it like this: plusCell.Attributes.Add("onclick", "/Add.aspx ...

How to dynamically insert an em tag into a table header cell using Asp.net

In my code, I have a table with dynamically generated table headers. One of the headers is for a textbox column. var thc = new TableHeaderCell { Text = "Iteration", CssClass = "iteration" } Now, I need to modify the logic to display a label indicating wh ...

Quickly switch between pages as they load

In Chrome, I'm experiencing a white flash between page loads that is causing transitions to appear choppy. I've taken various steps to optimize the site, such as using image sprites, reducing image sizes, minifying CSS, ensuring correct CSS loadi ...

What steps can I take to guarantee that the observer receives the latest value immediately upon subscribing?

In my Angular 2 and Typescript project, I am utilizing rxjs. The goal is to share a common web-resource (referred to as a "project" in the app) among multiple components. To achieve this, I implemented a service that provides an observable to be shared by ...

Ionic V4 - Production Build Error: The cordova.js script tag could not be located. As a result, plugin loading may not be successful

While using Ionic v4, I encountered an issue when running the app bundled in production mode (ionic cordova build android --prod). The console displayed an error message stating 'Could not find cordova.js script tag. Plugin loading may fail.' Add ...

Instructions for sending an email through a form while displaying a pop-up message

My Objective To create a functionality on my website where users can input their email addresses in a form and receive a validation popup indicating whether the email is valid or not. Background Information I am currently working on a website that allow ...

Is there a way to stop the navbar from covering the title?

Looking for help with customizing my navbar. At the moment, it resembles image one but I'm aiming for the appearance of image two. Any suggestions on how to achieve this? Is it a CSS modification that needs to be made? /* Nav Bar*/ .navbar-brand{ ...

Steps for resetting a div's display after adjusting the device size

I have a code that displays horizontally on desktop screens and vertically on phones. It includes an x button (closebtn) that is only displayed on phones to close the menu bar. How can I automatically display it again after resizing the page back to deskto ...

Activate just the show more / show less button on the website that has several buttons with identical ids

Whenever the "show more" button is clicked, additional images are displayed in the gallery and the button text changes to "show less". However, in my ExpressionEngine (CMS) templates and entries, all "show more" buttons share the same id, causing other but ...

Showcasing a badge counter within a tab

I am trying to implement a counter badge that shows the number of current packages uploaded next to its tab. However, I noticed that the badge only appears when I click on the tab. Ideally, it should automatically update and display the counter without nee ...

The custom stylesheet added to index.html is not taking precedence over the Bootstrap 5 styles applied through NPM

In my Vue 2 project, I encountered an issue with Bootstrap 5.3 when installed via NPM. My custom CSS stylesheet in the index.html file was not able to override Bootstrap's CSS. Interestingly, I faced no problems when using Bootstrap from a CDN. Addit ...

Having trouble with your GitHub Pages site displaying properly on desktop but working fine on mobile?

I am facing an issue with my GitHub pages site on a custom domain. It works perfectly fine on mobile, but when I try to access the same URL from desktop, I encounter a DNS_PROBE_FINISHED_NXDOMAIN error. Any suggestions on why this might be happening? You c ...

Looking to position content within a card to the bottom right in Bootstrap 4

Having trouble aligning my text and button within a card to the bottom right. Can't seem to get them to line up correctly. https://i.sstatic.net/OTDwJ.jpg This is what I have in my code: <div class="col-sm-3 text-right my-auto"> <div cl ...

The process of implementing a React onchange event in Angular using ngModelChange

html: <mat-form-field appearance="outline" class="inputBox"> <input matInput name="total" placeholder="0.00" [ngModel]="total" (ngModelChange)="handleOnChange('total', $event ...

What is the best way to align a checkbox and text in the same row within a Mailchimp embedded form?

I am troubleshooting a styling issue with my Mailchimp form that has groups. The problem I'm encountering is that the checkboxes are displaying on one line while the text appears on the next line in an unordered list format. To see the issue for yours ...

I am in need of a customized 'container' template that will display MyComponent based on a specific condition known as 'externalCondition'. MyComponent includes the usage of a Form and formValidation functionalities

container.html <div ngIf="externalCondition"> <!--Initially this is false. Later became true --!> <my-component #MyComponentElem > </my-component> <button [disabled]= "!myComponentElemRef.myDetailsF ...

How to position an SVG image directly next to text

Here is my JSFiddle with an SVG positioned to the left of some text inside a button. I am looking for a way to align the SVG vertically with the text within the button. I've considered a couple of methods: Trying to adjust the line-height, but that ...

Why do div and span display differently across browsers and how can we standardize their appearance?

My CSS file is currently displaying correctly in FF12, but the layout is different in Safari and Chrome. If images are not loading, you can view a live demo at This is how it should appear and does in FF: However, this is what happens in Safari and Chro ...