What steps do I need to take in order to ensure that this angular8 component occupies the entire height

Is there a way to make this angular8 component fill the entire height of the screen?

https://i.sstatic.net/JIupj.png

In the Root Style.scss file, the following code is present:

 html, body, app-root {
  min-height: 100vh;
  height: auto;
  margin: 0;
 }

The left green bar (DIV) should stretch to the full height of the screen:

 .nav-left-container {
  width: var(--nav-left-w); // 6rem;
  height: 100vh;
  background-color: var(--col-green-blue);
  position: absolute;
  top: 0;
  left: 0;
 }

HTML

<div class="nav-left-container">
  <div class="nav-logo-container d-flex justify-content-center align-items-center">
    <a [routerLink]="['/home']" routerLinkActive="" (click)=toHome()><img class="nav-logo-img"" alt=" "></a>
  </div>

  <div class="navigation-container d-flex justify-content-start align-items-center flex-column">
    <div class="home d-flex justify-content-center align-items-center mt-4 mb-5">
      <a [routerLink]="['/home']" routerLinkActive="" tooltip="Home" placement="right" (click)="toHome()"><img class="nav-link-img" src="../../../assets/images/ui/home.png" alt="home"></a>
    </div>
    <div class="search  d-flex justify-content-center align-items-center mb-5">
      <a [routerLink]="['/products']" routerLinkActive="" tooltip="Search" placement="right" (click)="toSearch()"><img class="nav-link-img" src="../../../assets/images/ui/barcode_search.png" alt="search"></a>
    </div>
    <div class="history  d-flex justify-content-center align-items-center mb-5">
      <a [routerLink]="['/history']" routerLinkActive="" tooltip="History" placement="right" (click)="toHistory()"><img class="nav-link-img" src="../../../assets/images/ui/history.png" alt="history"></a>
    </div>
    <div class="settingsd-flex justify-content-center align-items-center mb-5">
      <a [routerLink]="['/settings']" routerLinkActive="" tooltip="Settings" placement="right" (click)="toSettings()"><img class="nav-link-img" src="../../../assets/images/ui/settings.png" alt="settings"></a>
    </div>
  </div>
</div>

The main container on the page, which includes home and notifications (grey), has the following styling:

.home-container {
  width: calc(100% - var(--nav-left-w)); // to prevent horizontal scrolling;
  height: 100vh;
  margin-left: 6rem;
}

HTML

.home-container {
  width: calc(100% - var(--nav-left-w));
  height: 100vh;
  margin-left: 6rem;
}
<app-nav-top></app-nav-top>
<div class="container-fluid home-container">
  <div class="row">
    <div class="col-md-9">
      <div class="row mt-4">
        <div class="col">
          <div class="find-resource-wrapper mt-4">
            <a (click)="onFindResource()">
              <h1>Find a resource <fa-icon [icon]="faSearchPlus"></fa-icon>
              </h1>
            </a>
            <hr>
            <div class="find-resource-display-wrapper">
              <app-resource-list></app-resource-list>
            </div>
          </div>
        </div>>
      </div>>
      <!-- end find resource -->

      <div class="row mt-4">
        <div class="col">
          <div class="offer-resource-wrapper">
            <a>
              <h1>Offer resource <fa-icon [icon]="faSearchPlus"></fa-icon>
              </h1>
            </a>
            <hr>
          </div>
        </div>
      </div>
      <!-- end offer resource -->

      <div class="row mt-4">
        <div class="col">
          <div class="cycles-wrapper">
            <a>
            <h1>Cycles <fa-icon [icon]="faRecycle"></fa-icon></h1>
          </a>
            <hr>
          </div>
        </div>
      </div>
      <!-- end cycles -->
    </div>
    <div class="col-md-3 notification-area">
      <div class="row">
        <div class="col">
          <div class="mt-4">Logged in as</div>
          <div>
            <fa-icon [icon]="faEnvelope"></fa-icon> {{email}}
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Any suggestions on how to get the green bar to occupy the entire height of the screen would be greatly appreciated.

Thank you.

Answer №1

Consider tweaking your CSS for potential improvements.

.nav-left-container {
      width: var(--nav-left-w) // 6rem;
      background-color: var(--col-green-blue);
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
}

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

Adjust text size using the "increase toggle"

I'm having trouble adjusting the font size of my text within the <div class="comment more>. Whenever I try to wrap the text in a <p>, the "more toggle" functionality stops working properly. Instead of revealing more text when I click on "m ...

Angular 2's ngModel feature allows for easy data binding and manipulation, particularly

I currently have an array of objects structured like this... this.survey = [ {id: 1, answer: ""}, {id: 2, answer: ""}, {id: 3, answer: ""}, {id: 4, answer: ""}, {id: 5, answer: ""}, {id: 6, answer: ""}, {id: 7, a ...

What sets template-driven and reactive forms apart in practice?

Exploring the Angular2 new Forms API has revealed two distinct approaches to forms: Template driven and reactive (model-driven) forms. I am curious about the real-world differences between these two methods, beyond just syntax. Which approach is more adva ...

The production build failed following the upgrade to ag-grid version 22.1.1

Since version 18, I have been utilizing ag-grid, and I am currently on version 20.0.0. I am now in the process of upgrading to the latest version - 22.1.1. After addressing warnings/errors caused by breaking changes, everything seems to be working fine, ...

Strategies for effectively conveying jQuery and Angular

I have integrated jQuery DataTable into my code. I am facing an issue with the dataTables_scrollBody class which requires me to add a custom scroll bar. This is necessary because on Linux, the touch screen functionality in Chrome is not working effectively ...

What is the best method for inserting a 'Placeholder' in an Angular datePicker?

Looking for assistance with placing placeholder text inside an Angular datePicker, specifically wanting to display 'From' and 'To' labels within the datePicker. datePicker I am a novice when it comes to Angular development - can someon ...

Issues with undesirable spacing in CSS using the display property and table-cell display type

Having trouble grasping the concept of table and table-cell in css? See this example: http://jsfiddle.net/dd7h7/3/. HTML <div class="widget"> <div class="button"> <div class="content"> <div class="icon">A</div> ...

Inspecting HTML elements with Capybara for class and ID attributes

Trying to locate an element and use Capybara for validation. There's a specific element that I want to check for using page.should have_css. <i class="ui-grid-icon-cancel" ui-grid-one-bind-aria-label="aria.removeFilter" aria-lab ...

Activate unresponsive state when clicked

Struggling to implement a mobile responsive menu, my primary issue is the navigation buttons not toggling upon clicking. Here's what I have so far in terms of HTML and JQuery: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery. ...

Combining two CSS classes to create an "alias"

Currently, I’m utilizing bootstrap for table styling. For instance: <table class="table table-striped main"> However, the table I want to style is dynamically generated by a separate tool that I have no control over, and it already has its own ta ...

Storing a value in a variable using ngFor in Angular 4

Here is the code snippet I am working with: <ng-container *ngFor="let item of items"> <div>{{item.subArray[0].attr1}}</div> <div>{{item.subArray[0].attr2}}</div> </ng-container> I am wondering if it's possible to ...

ImageMapster for perfect alignment

I'm struggling with centering a div that contains an image using imagemapster. When I remove the JS code, the div centers perfectly fine, indicating that the issue lies with the image mapster implementation. It's a simple setup: <div class=" ...

Angular Error: Argument must be included in the dependency array

While making changes to a dialog form, I encountered an error. Instead of using a dialog form, I want to switch to a regular form. However, when I remove @Inject(MAT_DIALOG_DATA) from the constructor, I get an error. Any suggestions on how to resolve thi ...

What could be causing my JavaScript code to not function properly in an HTML document?

Hello, I am a beginner in the world of coding and currently delving into web development. Recently, I was following a tutorial on creating a hamburger menu but I seem to be encountering some issues with the JavaScript code. I have double-checked my Visual ...

Angular project icons not displaying in the browser

My current project in Angular was functioning properly until recently. I am facing an issue where the images are not being displayed on the browser when I run ng serve, resulting in a 404 error. Interestingly, everything else seems to be working fine witho ...

List in Angular remains empty

I am facing an issue with populating a simple HTML list using Angular. The problem arises when trying to display the data in the list. When I use console.log("getUserCollection() Data: ", data);, it shows an array which is fine, but console.log("getUser() ...

issue with ng2-semantic-ui: remote options not properly loading in select

public optionsLookup(query:string, initial:any): Promise<any> { return new Promise ( (resolve, reject) => /*[{ id: 1, name: 'ololo1'}, { id: 2, name: 'ololo2'}]*/ this.apiService.get('private/count ...

Move your cursor over X or Y to alter the color of Y exclusively

I am currently designing a navigation bar that includes icons followed by the title of their respective pages (for example, an icon of a home followed by the text 'Home'). I would like to change the color of only(!) the icon from black (default) ...

Encountering the error message "TypeError: this.http.post(...).map is not a function" after upgrading from Angular 5 to Angular

I encountered some issues with rxjs6 after upgrading from Angular 5 to Angular 6: TypeError: this.http.post(...).map is not a function error TS2339: Property 'map' does not exist on type 'Observable<Object>'. TypeError: rxjs__W ...

Looking to troubleshoot a white background issue while attempting to create a transparent navbar

I am trying to create a full-page landing with a transparent navbar using bootstrap4. My goal is to have a sticky navbar that remains at the top as the user scrolls down the page. When I apply the class 'fixed-top', the navbar stays at the top b ...