Is the Foundation clientHeight causing the body height to not reach 100%?

While creating a basic web page with Foundation, I have run into an issue regarding the dimensions of the body.

No matter what adjustments I make, the body's height remains fixed at around 400px, even though it should ideally fill up the entire page. This has caused elements on the page to overflow as if the body's height is not being recognized properly. Upon inspecting the console in Chrome, I noticed that the clientHeight property is consistently set at 400, indicating that the actual height of the page is somehow being restricted. It seems like the height is being overridden and stuck at 400px upon loading, but I am unsure why this is happening. Has anyone else encountered this problem before?

The version of Foundation I am using is 5.5.2, and here is the head section of my page:

<meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=0'>
<link rel="stylesheet" type="text/css" href="foundation.css">
<link rel="stylesheet" type="text/css" href="normalize.css">
<script src="scripts/modernizr.js"></script>
<script src="scripts/jquery.js"></script>
<script src="scripts/fastclick.js"></script>
<script src="scripts/foundation.min.js"></script>

EDIT - I've come to realize that the clientHeight property is initially set based on the visible window size when the page loads - which in this case is 400px due to my current window size. However, the issue persists as the body does not adjust its size according to the content within it.

Answer №1

Problem solved!

I discovered that setting height: auto; for the body was the key to resolving the issue.

Realizing that the body height was tied to the window size on load, I found that others had faced similar challenges.

Here is a link to related discussions on GitHub

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

Tips for implementing a CSS class on a select dropdown in multiple web pages

Having multiple dropdowns (select boxes) on my website has led me to desire different alignments for them. For instance, I would like one dropdown to be centered on a specific page while another should appear on the right side of a separate page. Since my ...

Is it possible to incorporate a background color into a table using the predefined classes in Bootstrap?

Is there a way to utilize the default color scheme in twitter-bootstrap-3? I attempted using "Active" and "Success" for colors rather than background-color, but it did not work with this code snippet. <table class="table table-bordered background-col ...

What is the color of the icon in an HTML5 input date picker?

Is there a way to customize the color of the calendar icon in the HTML5 date input (<input type="date" />) field? Specifically, I'm looking to change the icon color to #018bee or RGB: (1, 139, 238). I've read about using filters f ...

Close the gap in the CSS for the image tag

I am facing an issue. Whenever I include an img Tag in my HTML File, there is a Gap around the tag. It is neither margin nor padding. I wonder what it could be? Could someone please assist me in removing the gap with CSS? <img src="../images/modules/ ...

I'm having trouble displaying the result of my calculation in the code. Could it be because I forgot to include an output tag?

I am attempting to develop a Miles Per Gallon (MPG) calculator using Javascript. However, I'm encountering difficulties with displaying the results once the "Calculate" button is pressed. <html> <head> <title> MPG Calculator </ti ...

Aligning a element at the center is not functioning properly when using margin: 0 auto;

I'm having trouble aligning elements to the center when applying margin: 0 auto. You can view the code here: https://jsfiddle.net/helloworld123/vhhx1o7n/ The goal is to align the elements in the center of the page (.entry-wrap should be centered) and ...

What is the process for saving the selected value from a radio button into the database?

Below is an example of code I am working with: <label style="cursor:pointer;"><input type="radio" name="rads" value="'.$correct.'" id = "radio">'.$answer.'</label> <button onclick="myFunction()">Value</butto ...

What is the best way to transfer the ID from a div to a corresponding CSS identifier?

In my Sightly for an AEM component, I have the following setup. How can I use jQuery to dynamically insert the generated id into multiple CSS styles within each card on the page? <div id="${card.id}" class="card flex-card radius-lg rel bg ...

The mobile page is refusing to scroll, causing all the text to bunch up at the top of the screen

After learning HTML/CSS/Js/PhP over a few months, I recently completed my first website. I am facing an issue with one of the pages on my website when viewed on a mobile device. The parallax scrolling header image does not scroll either horizontally or ve ...

Issues with @material-ui/core and react-bootstrap imports are causing disruptions to the NextJS build process

After researching, I've come to realize that this issue is common among developers. Unfortunately, none of the solutions I found have worked for me. During npm run dev mode, everything in the project functions as expected, with all imports working se ...

How can I position a Font Awesome icon in the center of an image with Bootstrap 3?

I'm attempting to center a font-awesome icon on top of an image within bootstrap 3. Below is the image code enclosed in a div: <div id="quickVideo"> <a data-fancybox href="https://player.vimeo.com/video/153113362?autoplay=1&color=54 ...

The media object in Bootstrap 4 with a pre tag inside is not adhering to the width of the container

Trying to incorporate a media object inside a Bootstrap column is proving challenging. Whenever I insert long strings of code within the .media-body class using <pre><code>...<code></pre>, the entire media object extends beyond the ...

Excessive Expansion of Website Width

Initially, I crafted a website on my local server, and it had the ideal width. Afterwards, I uploaded it to the live server and made some design modifications. To my surprise, there is now an unexpected scroll bar at the bottom of the page, causing the s ...

text shaped into a curve within a container

$().ready(function() { $('#demo1').circleType({fitText:true, radius: 180}); }); $().ready(function() { $('#example').arctext({radius: 250}); }); <script type="text/javascript" src="http://ajax.googleapis.com/ ...

Leveraging jQuery for vertical alignment of an image

I am trying to vertically center an image with the class .personal within a container with the class .personal-row (located inside .row-main) on page load and when resizing. Initially, I attempted using vertical-align: middle;, but that did not yield the d ...

Incorporate JavaScript values into an HTML form to submit them to PHP

How can I successfully POST the values of 'vkey' and 'gene+varient' when submitting a form in HTML? The values are retrieved using JS code and displayed correctly on the form, but are not being sent upon submission. <form action="ac ...

Tips for verifying phone numbers on an HTML form

Need assistance with validating a 10-digit number input. The first two digits must be either '05' or '06'. Seeking guidance on how to achieve this validation in PHP or JavaScript. Appreciate any help, thanks! ...

Updating pictures on Bootstrap's project showcase template

I attempted to modify the source of an image by clicking on smaller ones using bootstrap’s template found at . Despite my efforts, I have not been able to achieve the desired result. (Any help is greatly appreciated!) I included id="myImage" on the main ...

Styling with CSS 3: Adding Shadows and Rounded Edges

Encountered an intriguing discovery and I'm hoping you can shed some light on it. Here's the code in question: width:940px; margin:0 auto; padding:13px 29px 39px 31px; background:#fff; -webkit-border-radius:10px; -moz-border-radius:1 ...

A guide on retrieving the value of input elements using class names in jQuery

I need help fetching the values of input elements with the class "features". I am able to access all of them. alert($('.features').length); Can someone please confirm if my understanding is correct? $('.features') is an array of HTM ...