Assistance Needed for a Persistent Footer

I am experimenting with a sticky footer for the first time on my website, but it doesn't seem to be working as expected. There is a large white space followed by a black area (which matches the color of my footer). You can see the issue at this link . I want the footer to align directly with the bottom of the content, which in this case is unstyled text. Below is the code I have been using - thank you for your assistance - Charley

CSS

/* sticky footer */
* {
margin: 0;
}
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -335px;
}
.footer, .push {
height: 335px;
background-color: #000;
}
#innerfooter {
width: 847px;
height: 335px;
position: relative;
background-image: url(../images/black_bar.png);
background-repeat: no-repeat;
text-align: left;
margin: 0 auto;
}
/* end sticky footer */

Answer №1

Give this a go, it will remain at the bottom of the page if the content isn't lengthy enough, but will support the bottom if the content extends to it

Answer №2

Take a closer look at your HTML layout (especially the .wrapper div). The positioning of the div seems to be incorrect.

Also, make sure to check out this resource:

Answer №3

The persistent gap you are experiencing is a result of the fixed positioning of your footer, anchoring it to the bottom of the browser. This white space represents the untouched width of your background. To address this issue, consider adjusting the width of your page or exploring alternative solutions. It's crucial to grasp the concept behind the problem rather than simply following step-by-step guides for a quick fix.

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

Guide on positioning the Bootstrap accordion button ahead of text and modifying its appearance

Check out this link for a bootstrap accordion with plus and minus icons: I'm looking to put buttons similar to the ones shown in this image: https://ibb.co/GJRGKnn Additionally, I would like to change the style of the buttons to match what's di ...

Using PHP variables in JavaScript to access getElementById

I have multiple forms displayed on a single PHP page. They all follow a similar structure: <form id="test_form_1" action="test_submit.php" method="post" name="test_form"> <label>This is Question #1:</label> <p> &l ...

jQuery 'if' condition not getting detected

My jQuery code is not recognizing an if statement. You can check out the CodePen link here. On my site, I have 4 page transitions - page right, page left, page up, and page down. The contact page is hidden beneath the main hero sections and appears with t ...

CSS for Page Header with Scroll-Over Content

Having trouble creating a "collapsing header" design where the page content scrolls over the banner image. I've tried adjusting z-index and positioning properties in CSS, but can't achieve the desired effect. Any help or guidance would be greatly ...

What adjustments can be made to alter the height of the borders on the left and right side of the block quote, and link the border to a different div element

Block Quote Example I'm looking to create a blockquote that resembles the image provided. I have successfully implemented the top and bottom gradients, but am facing challenges with the left and right borders as well as rounding the quotations more. ...

Bootstrap Carousel fails to function properly

I have tried everything, even using code directly from ww3 with added cdn. It worked on bootstrap 4 beta, but the rest of my site is using an earlier version. I'm new at this and hesitant to mix versions unnecessarily. <!DOCTYPE html> <html ...

Is the append() function malfunctioning in jQuery?

Why is it copying two lines when I only want one line to be cloned on button click? Is there a way to make sure that only a single line is copied each time the button is clicked? Here is my code: $(function() { $('.add-more-room-btn').clic ...

Issues with the execution of Jquery function

Hey guys, take a look at my code: //Additional Jquery codes // display_popup_crop : revealing the crop popup function display_popup_crop(link) { alert("show_popup_crop function is triggered!"); // changing the photo source $('#cropbox&a ...

Do I need to include both the JavaScript and CSS CDN for the bootstrap CDN to work properly, or can I just use one of them?

Which resource should I use for my project? Should I go with CSS, JS, BUNDLE or all of them? https://i.sstatic.net/0Yi3F.png I am interested in using button styling, grid, card components (and possibly dropdowns in the future) https://cdn.jsdelivr.ne ...

Designing a horizontal CSS form with boxes positioned above the text, all done without relying on tables for layout

Do I need to divide everything into divs in order to create a table like the picture I made below? ...

What is the method to showcase the value stored in the "username" table?

I came across this code online and attempted to include a column with the "username" value. However, I am facing an issue where it is not displaying the username value from the database in the PHP table. <?php $no = 1; $tampil = mysql_query("SELE ...

What steps are involved in creating a circular shape on canvas?

I am trying to create a circular shape in the canvas using the code below. The code involves moving an object with keyboard keys, and I need help making the canvas shape into a circle without affecting the functionality of the code. I attempted to modify t ...

Personalized HTML checkbox featuring custom labels

I'm working on a website where I want to personalize the appearance of checkboxes with labels. Can anyone recommend some good libraries that can help me achieve this? For example, I have heard about the ibutton library, but I'd love to explore o ...

If the color of the border matches and the width of the border is equal to

As I navigate through multiple divs, my goal is to identify those with a distinct blue border. Furthermore, if a main div possesses a blue border, I need to check for any inner divs that also have a blue border or a border width of 3px. If the main div has ...

What is the method for swapping out the numerical ending of a value three times, increasing the ending, and then looping it with Text Pastry?

I am faced with the task of generating 210 unique checkboxes, each requiring its own distinct name, id, and label for value. These checkboxes are organized in tables, with each table containing 6 checkboxes. So far, I have manually configured 54 checkbox ...

Using Angular 2 to position a md-fab button with 'position: fixed' inside an inner component

Utilizing the md-fab-button from the initial angular2 material-framework has presented a challenge for me. I am attempting to set the md-fab-button(for adding a new entity) with position: fixed, but my goal is to position the button within an inner compone ...

Creating a Django URL path using an HTML search form

Within my template, I have implemented an input field with the type "search". Upon triggering an action, the page redirects to "/search_results.html". The current dilemma I am facing is that it is adding /?search=yoursearch to the end of the URL. This is ...

Float isn't showing on the screen

I'm encountering an issue where the float property applied to my #middle-content element is not displaying and also removing its background. My objective is to have the middle-content positioned to the right of #leftcontent. Any assistance would be gr ...

Encountering issues with loading tooltips when using Tooltipster alongside ClipboardJS upon clicking

In my project, I am using Bootstrap5, ClipboardJS, JQuery, and Tooltipster. Despite following the initial instructions on the Tooltipster website closely, I am unable to determine what I missed. Here are the two sections, one for the JavaScript scripts an ...

Trouble with the function to dynamically add and delete table rows

Currently utilizing Wordpress with WPMVC for my projects. In the process of dynamically adding table rows to a form in order to insert a new record into the table. Snippet of the code: views/admin/edit.php <h2>Edit Geozone</h2> <?php ec ...