HTML generates areas of blank space

Currently, I am in the process of developing a web page using Angular 2 and PrimeNG Design Framework. The layout is simple, with a menu bar at the top and content below it to fill the remaining space. However, there seems to be an unexplained gap at the bottom, as shown in the image provided.

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

Here is the snippet of my HTML code:

#siteContainer {
  height: 100%;
  width: 100%;
  display: table-row;
}

#menuContainer {
  display: table-row;
}

#p-tabView {
  height: 100%;
}
<div id="siteWrapper" style="min-height: 100%; width: 100%; display: table">
  <!-- Top Menu Bar -->
  <div id="menuContainer">
    <app-skeleton></app-skeleton>
  </div>
  <!--Container for site content-->
  <div id="siteContainer">

    <p-tabView id="tabView" orientation="bottom">
      <div id="tabPanelContainer">
        <p-tabPanel>
          <!--tabbody-->
          <p-card>
            <app-display-widgets style="{border: #7A7A7A 2em solid;}" *ngIf="sheet.id === refreshCurrentSheet()" [dashboardID]="dashboard.id"></app-display-widgets>
          </p-card>
        </p-tabPanel>
      </div>
    </p-tabView>

  </div>
</div>

Answer №1

To eliminate margins, include margin:0 in your html and body tags.

<style>
    html, body{
      margin: 0;
    }

    #siteContainer {
      height: 100%;
      width: 100%;
      display: table-row;
      background: blue;
    }
    #menuContainer{
      display: table-row;
    }
    #p-tabView {
      height: 100%;
    }

Answer №2

Try incorporating this code snippet into your project to potentially resolve the issue

body {
margin:0;
padding:0;
}

Answer №3

To troubleshoot, verify whether your router outlet is enveloped within a container fluid element. If it is, consider adjusting the CSS of the container fluid to suit your needs or simply remove the enclosing div/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

Receiving the [object HTMLInputElement] on the screen rather than a numerical value

I have an input box where a user can enter a number. When they click a button, I want that number to be displayed on the page. However, instead of seeing the number, I am getting the output as [object HTMLInputElement]. Below is my TypeScript code: let qu ...

Bootstrap tab toggling with checkbox

I'm attempting to create tabs with the ability to include checkboxes, but when using data-toggle="tabs", the checkbox functionality seems to be disabled. Here is the link to my fiddle. Is there a solution to make the checkbox work within the tab tog ...

How to implement an OR condition using EJS?

These different options both function correctly: <% if(currentUser.collegeLevel === "High School") { %> <h1>They attained a High School Diploma</h1> <% } %> <% if(currentUser.collegeLevel === "Associates Degree") { %& ...

Adjusting the width of an image in Safari

I just launched my website, but I encountered an issue with the image size in Safari. In my CSS, I set the width like this: img { width: 450%; } Here is the site: I can't figure out why the images display correctly in Chrome and Mozilla, but ...

Is there a way to redirect the user directly to the upload page without displaying the response?

Recently, I came across this code snippet that adds a progress bar to an upload form. Currently, the code displays the response from the upload page below the form. However, my goal is to redirect the user to the upload page so they can view the response t ...

Appear and disappear div

I am seeking to achieve a specific goal: I want to fade in a div with text after a certain number of seconds, then fade it out. I also want to repeat this process for 4 other divs, ensuring that they do not interfere with each other by appearing while the ...

Content of two li tags in row and column are not aligned properly

I am struggling with ensuring that the two columns and two rows of text in my page section are always aligned correctly. Column 1 and the contents of row 1 should be on the same line, but instead, column 2 is appearing a line or two below column 1. This is ...

Differentiate input elements with custom styling

I'm experiencing an issue while trying to style a specific form field in Angular 7. The style doesn't seem to be applying properly. Below is my form structure: <ul> <li> <mat-form-field *ngIf="number"> <input ma ...

Looking for assistance with transferring a data attribute to a form redirection

I'm seeking assistance with a coding dilemma I've encountered. To provide some background, I have a list of items on my website, each featuring a 'Book Now' button that redirects users to different pages. Recently, I incorporated a mod ...

What is the method for creating a rectangle with text inside using HTML and CSS?

Hello, I need help with achieving this design using HTML and CSS. Can you assist me, please? https://i.stack.imgur.com/xOHVX.jpg This is what I have attempted so far: Below is my CSS code: .line-lg{ width:120%; text-align: center; border-bot ...

How do you locate elements using text in Selenium with special characters like &#65279?

As a newcomer to test automation, I'm looking for a way to click on a link with only partial text available. I am aware of the find_element_by_partial_link_text method, but there seems to be random words in the code that include &#65279;. This pre ...

Creating a menu that is even more optimized for mobile devices

I recently came across a mobile menu style that I really like: https://www.w3schools.com/html/default.asp What I appreciate about this style is that even on smaller screens, it still displays some main navigation items. This allows for popular links to be ...

Integration of a QR code scanner on a WordPress website page

I'm in the process of setting up a QR code scanner on my Wordpress site or within a popup. The goal is for users to be able to scan a QR code when they visit the page/popup link. Specifically, the QR code will represent a WooCommerce product URL, and ...

Tips for implementing a scrolling renderer in ThreeJS?

I'm currently utilizing the OrtographicCamera. Within the HTML, a canvas is declared and then passed to the renderer like this: var canvas = document.getElementById("canvas") var width = canvas.clientWidth; var height = canvas.clientHeight; render ...

send a variable across multiple web pages at the same time

Currently, I have a variable that needs to be passed through multiple PHP pages. The code below effectively sends the variable to one page (index.php). echo "<a href='index.php?PHOTO=".$i."'>select</a>"; However, I am wondering how ...

Retrieving a PHP script from within a DIV element

I am seeking assistance to successfully load a PHP file from a DIV call. Below is the code I have used: <html> <head> </head> <body> <script class="code" type="text/javascript"> $("#LoadPHP").load("fb_marketing ...

Picking an item for alignment at the center with flexbox styling

What was the reason for specifying .footer-background to have a display: flex property in order to center the .copyright-text? Why did setting display: flex on .footer not achieve the desired result? .footer-background { background-color: #00008B; ...

The swipe function of Hammer.js is unable to detect gestures on a rotated iframe

After creating a rotated iframe on the page using CSS transforms, I attempted to implement swipe events within the iframe. body.rotate iframe { transform: rotate(90deg); transform-origin: top right; position: absolute; t ...

Error: Attempting to access 'position' property of undefined object in ThreeJs is causing a TypeError

I am currently facing an issue with integrating a 3D model into the background of the hero section on my website. The integration works fine, but I noticed that when I manually resize the window, the 3D model does not adjust to the new size. Additionally, ...

Responsive Bootstrap container with flexible column layouts

Forgive me if this sounds silly, but I'm struggling to find an answer for what I want to accomplish... I'm attempting to create a responsive container div (similar to a column inside a row). For example, I would like to achieve the following ef ...