The sticky footer is functional on every page except for one

Check out the page here

I have implemented a sticky footer on my website, however, it seems to be working perfectly except for on my portfolio page. The issue I am facing is that the gallery section, which is relatively positioned, is overflowing from its parent div causing the footer to stick at the bottom of the parent instead of the whole page.

Any suggestions on how to fix this without having to rewrite all of my existing code?

Answer №1

Feel free to give this a try - it might be just what you need.

html, body {
    height: 100%;
}
header {
    background: #fff;
    position: relative;
    z-index: 100;
}
.content2 {
    clear: both;
    margin: 0 auto;
    padding: 0;
    text-align: center;
    width: 70%;
}
.gallery {
    display: table;
    height: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    position: relative;
    width: 100%;
}
#footer-block {
    bottom: 0;
    position: fixed;
    width: 100%;
}

Many thanks!

Answer №2

Resolved the issue by setting the height of the body and html to 110%, making the footer wrapper 100% in height, and including a page wrapper set at 100% height.

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 adjusting the height of the NextJS Image tag based on the width of the screen

I'm leveraging next/image to display my image in the following way: <Image src={imageLink} width="1920" height="512" alt="Hero Image" /> Everything works well for screen widths larger than 750px. Is there ...

The largest contentful paint is anticipating an unidentified event

My website is encountering issues with Google Pagespeed and I'm unsure of the cause. The primary bottleneck appears to be the LCP time, which Google reports as taking between 7 and 11 seconds during each test. Upon analyzing the waterfall chart, it ...

Incorrect Alignment of Centered Boxes with CSS

I'm having trouble creating centered boxes with CSS. Currently, I have the following code: http://jsfiddle.net/LW7mN/2/ .trex-clear-all{ display: inline-block; width: 99%; height: 17px; font-size: 12px !important; text-align: -w ...

Is there a way to implement a css/javascript property specifically for a div that is selected in the url?

Take for instance the scenario where I possess the URL example.com/#foo. In this case, CSS styling will be directed to the div with the id foo. If achieving this solely in CSS is not feasible, what methods in JavaScript or jQuery can be used efficiently ...

Experience the magic of CSS Sprite once it's been successfully uploaded!

Visit the website for testing here Located at the bottom of the page are two images with hover effects - one labeled "Contact us" and the other "Jobs Available!" During local testing, these images are visible. However, once uploaded to a server, they dis ...

Unable to modify the formatting of this block within the forum (CSS)

I've been working on customizing a theme by changing the colors. While updating an IPB theme, I have successfully converted most of it from white to grey, except for one part. I've attached a Gyazo link with a sample post where the white color ...

The left and right arrows maintain their visibility even when they are outside of the image

I am a beginner in the world of web development and I am trying to implement left and right navigation for images using arrows. My goal is to have the arrows fade in when the mouse hovers over the image and fade out when it's moved away. However, I am ...

Adjusting the layout of your WooCommerce items to fill the entire page or eliminating padding to ensure responsiveness is necessary. At the moment, there seems to be inconsistency with margins and paddings

Here is the layout for the desktop view: https://i.sstatic.net/KtLOg.jpg And for mobile view: https://i.sstatic.net/UJmG1.jpg I am facing an issue with my product catalog (woocommerce) images not fitting the full screen. I believe this issue may be rel ...

Having difficulty submitting a form with ajax, while accomplishing the same task effortlessly without ajax

I have been experimenting with submitting a form using ajax to the same .php file. When I submit the form without ajax directly (form action), the database gets updated. However, when I try the same process with ajax, there is no change in the database. H ...

Vanishing Submenus

I'm experiencing an issue with my navbar and its drop-down menus. When I hover over the submenu, it doesn't stay visible as expected. I've tried different approaches such as using jQuery, the + operator in CSS, and even creating a separate h ...

What steps can be taken to ensure the visibility and accessibility of two vertically stacked/overlapped Html input elements in HTML?

I have encountered a challenge with my HTML input elements. There are two input elements that overlap each other, and I would like to make both inputs visible while only allowing the top input to be editable. I have tried several approaches involving z-ind ...

Achieve a flat text indentation similar to an ordered list using CSS

Is there a way to format my FAQ Q & A like an ordered list? <div class="col-left"> <h3><strong>CAPTION</strong></h3> <ul> <li>Q: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspe ...

In Firefox 50.0, the button's resizing feature causes the parent div container outline to adjust size

I am currently working on developing a responsive design with the feature of having a button that appears to "float" under a div element. My desired outcome is achieved in Opera and Chrome: https://i.sstatic.net/Vm55V.png In Firefox, the result is not as ...

Having difficulty adjusting the padding of the Material UI table

I have been using the Table component provided by the material-ui library in my React project. However, I have encountered an issue where each row, including the header, has a padding of 24px on the top and bottom that I am unable to modify or overwrite. D ...

There are various webpages available on GitHub Pages and also on the live server

After creating a web page using HTML, CSS, and Bootstrap, I uploaded it to GitHub Pages. However, when I viewed the page through VS Code, it looked different from how it appeared on GitHub Pages. <!DOCTYPE html> <html lang="en"> < ...

Ways to apply the margin-top property to create space between an input field and

I have been experimenting with Vue and I created a simple code snippet. <template> <div> <input /> <span class="span-text">Hi</span> </div> </template> // index.css .span{ margin-top: 3px; } I a ...

Ensure that text remains centered within a resizable div without wrapping

My website features a sidebar menu that is resizable and has a collapse animation transition. Some of the text in this sidebar needs to be centered, but I've run into an issue - when using text-align: center; to format the text, it shifts around as yo ...

Display user input within a modal dialogue box

I have a subscription form that requires users to enter their name and email address. After clicking on "Compete Now," a pop-up appears asking for workshop information and postal code. The form is functioning correctly as intended. However, I want the em ...

Achieving full table height with a parent having a min-height requirement

Encountering a seemingly straightforward issue where I am unable to make an inner div 100% height of the parent div, which is set with min-height 70vh. My goal is to have the table inside be 100% height and content vertically aligned. It currently works if ...

Issue with parallax scroll feature on Mobile Safari not functioning as expected

I created a JavaScript code for parallax scrolling on an image at the top of a webpage. The code functions perfectly on Chrome, Firefox, Internet Explorer, Opera, and Safari on desktop. However, when I tested it on Safari on my iPad, the parallax effect wa ...