The issue of body height not functioning properly when using a skeleton

Greetings! This is my debut question on Stack Overflow, and I am hopeful that someone can provide me with some guidance.

I have encountered a hiccup while working on my webpage using the Skeleton framework. The issue at hand is setting the "height" to 100%. I aim to keep my footer fixed at the bottom so that the remainder of the page extends to fill the entire window. How can I achieve this?

Below is the code snippet:

html {
    font-size: 62.5%;
    min-width: 100%;
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    height: 100%;
    max-height: 100%;
}

body {
    font-size: 1.5em;
    line-height: 1.6;
    font-weight: 400;
    font-family: 'Lato', sans-serif;
    color: #FFD6ED;
    background-color: #1D003E;
    min-width: 100%;
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    height: 100%;
    max-height: 100%;
}

The HTML structure is fairly standard:

<html>

<body>
    <header>
        <div class="container">
            <div class="rows">
                <div class="twelve columns">
                    Content
                </div>
            </div>
        </div>
    </header>
</body>

</html>

Despite trying various methods, nothing seems to be effective. Even setting height: 100vh did not yield any positive results. I have scoured through multiple threads here in search of solutions, yet none of them have made a difference.

Answer №1

There are numerous approaches to accomplish this task. One method is using Flexbox. For more information, you can search for "sticky footer".

body {
  margin: 0;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}
main {
  flex: 1;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" />

<body>
  <main class="container">
    <header>
      <div class="rows">
        <div class="twelve columns">
          Content
        </div>
      </div>
    </header>
  </main>
  <footer>
    <div class="container">
      Hello there!
    </div>
  </footer>
</body>

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

Eliminate XML namespaces from HTML content generated through XSL in PHP

In my PHP routine, I am utilizing XSL to convert XML into HTML. The issue I am facing is that xmlns namespaces are being added as attributes to the h2 element during the transformation process. PHP: $url = "http://www.ecb.europa.eu/stats/eurofxref/eurofx ...

Unable to adjust price slider on mobile device, bars are not sliding

I have been utilizing the jQuery slider from lugolabs.com for my website, and while it works flawlessly on desktop, it seems to have issues when viewed on mobile devices. You can check out the slider at this link: The library used for this slider is jQue ...

The JavaScript code will automatically execute loops

Let me illustrate my point with two functions. Function 1 This function triggers a transition when you hover over the square. If you move your mouse off the element and then back on while the transition is still in progress, it will wait until the end of ...

Adding a module to Prestashop's html code manually

I am facing an issue while trying to manually insert a Prestashop module directly into the HTML code. Specifically, I want to include the categories module in the header.tpl file. However, when I try to copy and paste the code from the blockcategories.tpl ...

gulp-minify-css-names not altering any files during processing

For quite some time, I have been on the search for a solution that can assist me in automating the process of renaming/minifying class names in HTML, JS, CSS files simultaneously throughout my entire project using gulp. While there are many solutions avai ...

I am struggling to make mod_proxy_html function properly - no signs of debug output or errors

I have Apache version 2.0.52 running and I've successfully compiled the mod_proxy_html module (version 3.1). Apache starts without any errors, however, the issue I'm facing is that the module doesn't seem to be doing anything - there's ...

Enhance your website with a unique hover and left-click style inspired by the functionality of file explorer

I have a set of items like this: I am trying to replicate the functionality of a file explorer in terms of item selection. To clarify, I aim to create a feature where hovering over an item and left-clicking it would generate a virtual rectangle to select ...

Is there a way to retrieve content in tinymce from a JSP file and send it to a servlet that then redirects to a different page

I need guidance on how to store the content from the tinymce editor and post it with a new page creation. What steps should I take? ...

Blurry font rendering occurs when an element is scaled using CSS

I want to add a scale animation to a bootstrap button, but the text appears blurry. I've tried all the solutions mentioned here. How can I resolve this issue? Below is the code snippet (text is slightly less blurry in the snippet compared to my pr ...

Is there a way to adjust the text color of a label for a disabled input HTML element?

If the custom-switch is active: the label text color will be green. If the custom-switch is inactive: the label text color will be red. A JavaScript (JQuery) method call can be used to activate one button while deactivating another. The Issue It appe ...

What is the best way to activate a progress bar upon clicking a button in an HTML document?

Is it possible to make a progress bar start moving upon clicking a button using only HTML? I am new to coding (just started today) and would appreciate some guidance on how to achieve this. This is what I currently have: <input type="image" src="Butto ...

The functionality of the button seems to be malfunctioning specifically in the Mac Firefox

My button isn't working in Mac Firefox only. Below is the code: <button class="col btn-change"><a href="/p/88" style="color: white;">Landscape</a></button> However, the following two codes are functioning correctly. In the fi ...

Tips on using b-table attributes thClass, tdClass, or class

<template> <b-table striped hover :fields="fields" :items="list" class="table" > </template> <style lang="scss" scoped> .table >>> .bTableThStyle { max-width: 12rem; text-overflow: ellipsis; } < ...

Employing CSS selectors to target the subsequent element that is accessible

Here is the structure of my HTML: <input type = "checkbox" style = "display:none" id = "select"> <label for = "select" id = 'click'> click </label> <div class = 'next'> </div> I am trying to style t ...

What is the best class to implement in my jQuery code?

Currently in the process of developing a customized Google Chrome extension. Encountering an issue or experiencing confusion regarding the selection of a specific class to integrate into my jQuery script, particularly with numerous classes associated with ...

I am trying to confirm in PHP whether any of the gender checkboxes have been selected. However, the code I have tried so far does not appear to be functioning as expected

Please refrain from suggesting the use of checked = "checked" in HTML, as the validation must be performed in PHP as per the requirements of my assignment. PHP Code: if (isset($_POST["gender"])) { $gender = $_POST["gender"]; if (($gender != "male") || ( ...

Tips for transferring information between two distinct pages utilizing the jQuery POST technique

I'm dealing with two PHP files called card_process.php and payment.php. My goal is to transfer data from the cart_process page to the payment page. Here's a snippet of the code: In cart_process.php: $paynow = "<button type='submit' ...

Creating a div that overlays other divs using html and css

On websites like Facebook and LinkedIn, there is a search box where you can type in your query and the results will display below it, covering up other content on the page. This functionality is shown in the screenshot below from LinkedIn. I am curious ab ...

Is it possible to designate touch as the top finger and always have touch 2 be the bottom finger on the screen?

Is there a way to specify touch1 as the upper finger on the screen and always have touch2 as the lower finger, even if the lower touch is detected first? var touch1 = e.originalEvent.touches["0"]; var touch2 = e.originalEvent.touches["1"]; Can these ...

Ways to adjust the height of a multi-level responsive sidebar

My sidebar menu has multi-level sub-menus, but when I expand them, the bottom content becomes hidden. Even though the height is set to 100%, the last menu disappears as I continue expanding. How can this issue be fixed? Link to my JSfiddle: Here .nav-b ...