The bottom section is not displaying properly at the conclusion of the div slide

The division ends without displaying the footer.

<div id="fullpage">
  <div class="section " id="section0"> content1 </div>
  <div class="section " id="section0"> content1 </div>
  <div class="section " id="section0"> content1 </div>
  <div class="section " id="section0"> content1 </div>
</div>
<footer> this is my footer </footer>

Here is the corresponding script:

<script type="text/javascript">
  $(document).ready(function() {    
     $('#fullpage').fullpage({
        verticalCentered: false,
        resize : true,
        easing: 'easeInQuart',
        navigation: true,
        navigationPosition: 'right',
        scrollOverflow: false,
     });    
  });
</script>

Although smooth scrolling works with full page js, the footer fails to display.

Answer №1

The unique footer modification you attempted is not inherently supported by fullpage as it comes. I've developed a straightforward extension to the original fullpage.js that addresses this issue.

            if (v.anchorLink == 'footer')
            {
                footer_a = $('#section-footer').height();
                footer_h = $('#footer-text').height();
                var translate3d = 'translate3d(0px, -' + (v.dtop - footer_a + footer_h) + 'px, 0px)';
            }
            else
            {
                var translate3d = 'translate3d(0px, -' + v.dtop + 'px, 0px)';
            }

You can test it out here: link

The height of the footer dynamically adjusts based on the content within it.

Answer №2

It seems like your code on the fiddle is slightly different from what you originally posted, but the solution should still work for you.

Update your CSS as follows:

#footer{
    bottom:0px;
}

To:

#footer{
    position: fixed;
    bottom:0;
}

http://jsfiddle.net/GUTBA/

EDIT - The provided solution will fix the footer at the bottom of the page across all sections. If you want it to appear after the last slide, consider the options below:

If the footer has a fixed height: Modify the CSS to:

#footer{
    bottom: 20px;
    height: 20px;
    position: relative;
}

http://jsfiddle.net/vU5hY/

This adjustment will move the footer up by its height after the slide.

If the footer does not have a fixed height: Update the CSS to:

#footer{
    bottom: 0;
    position: absolute;
}
.section {
    position: relative;
    text-align: center;
}

Revise the HTML to:

<div class="section" id="section3">
    <div class="sectionContent">
        <h1>Section 3</h1>
    </div>
    <div id="footer">Footer</div>
</div>

http://jsfiddle.net/CKGQ5/

Place the footer in the last slide, and set the container as position: relative; so that when we set the footer to position: absolute; its positioning is based on the container.

Answer №3

If you want to achieve this, you can utilize the new auto-height sections feature in fullpage.js 2.7.1.

Take a look at the documentation for more information.

For a live demonstration, check out this online example. Scroll down to the last section to see it in action.

Answer №4

I implemented a non-fixed footer that is positioned outside of the fullpage div. After testing out different CSS codes for a fixed-height footer, I noticed an issue where there was extra space below the footer matching the height specified in the 'bottom' attribute (in this case, 20px).

Instead, I found a solution that does not create the additional space, making it suitable for a footer with variable height:

.footer {
    padding: 30px 0;
    bottom: 75px;
    margin-bottom: -75px;
    position: relative;
}

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

In the scenario where PHP outputs the complete form as JSON before rendering it as HTML, the form becomes unrecognizable and undefined once passed

In this particular situation, I am encountering an issue where I am sending back an entire form filled with values from PHP as JSON. The intention is to fetch this data in jQuery and then append it to a div for display. However, when attempting to submit ...

Retrieving JSON data from the server using ASP.NET

I have been attempting to retrieve a JSON object using an ajax call, but I seem to be facing some difficulties. Despite examining my code, I am unable to pinpoint the mistake. Below is the snippet of my controller: public class RandomController : Controll ...

Creating a Vuetify dialog sheet with stylish rounded edges

Is there a way to implement round corners for the dialog within the v-bottom-sheet? Note that using style="border-radius:20px;" only affects the overlay, not the dialog itself. <v-bottom-sheet style="border-radius:20px;" v-model=& ...

Aligning the stars with CSS

One of the components I have deals with a star rating system, and I thought it would be cool to use Font Awesome icons for half stars. Everything is working well except for the CSS styling aspect. While I managed to position some of the stars correctly by ...

Having trouble with uploading images?

I'm having issues with using PHP to upload an image to a folder. Can someone please help me troubleshoot this? Thank you! Here is the code for setup.php <?php include("../includes/config.php"); ?> <?php if ($_SESSION["isadmin"]) { ...

Smoothly scroll down to the bottom of the page with a jQuery button using the anchor

Recently, I've been working on setting up a navbar with buttons that smoothly scroll down to specific sections when clicked. However, as a beginner in jquery, I'm having some trouble figuring out how to make it work seamlessly. Can anyone guide ...

Html page only visible to authorized users

Is there a way to upload an html file to my website without making it visible to everyone? I don't want search engines like Google or Bing or any web spider to index it. I don't want to password protect it either. I just want it to be truly invis ...

Ways to track activities involving a specific input element

Currently, I'm dealing with an input field within an ASPX page utilizing minified JavaScript. Unfortunately, I do not have access to the C# source code for this particular page as it is not publicly available. However, I can still make changes to the ...

In JavaScript, use the following code to replace "(" with "(":

Is there a way to dynamically transform the string "Test(5)" into "Test\(5\)" using JQuery or Javascript? I attempted this approach, but it did not work as expected var str = "Test(5)"; str = str.replace("(","\("); str = str.replace(")"," ...

HTML - Table Layout Overlap

I'm struggling with a table layout issue in HTML and could use some assistance. The table below is displaying as overlapping in IE (please refer to the image), but it appears correctly in FF. Can anyone offer some guidance? <div> <table> ...

Setting line height as a pixel value does not yield the desired result

$(element).css(options.css).attr(options.attr).addClass(options.class) //ensure line-height is correctly assigned if($(element).is('p') && _.isString(options.css['line-height'])){ console.log('line-height assigned: &apos ...

The background-repeat property in CSS appears to cease functioning when the container becomes too wide

Exploring various combinations of space and round values for background-repeat, I've discovered a way to utilize radial gradients to create a visually appealing dotted border on an element without having the dots cut off. .test { background-repeat: ...

The alignment of my divs is all out of whack -

Currently, I have styled my website to work perfectly in Firefox, but it's not appearing correctly in Chrome. You can see the layout at . My goal is to maintain the layout as seen in Firefox while also making sure it displays properly in Chrome and IE ...

Setting the image source for each image in a table using VB.net

Is it more efficient to loop through the img src of various cells using a For Each loop and set their src based on another value (x) by directly referencing the img src attributes in code, or would embedding the table in a control higher up the hierarchy ...

Dealing with a passed EJS variable in string form

When working with passed data in ejs, I usually handle it like this and it works perfectly: let parsed_json = JSON.parse('<%-JSON.stringify(passed_data)%>'); However, I encountered a problem when trying to dynamically pass a string variabl ...

Jquery error caused by index variable in form validation issue

While attempting to validate 8 radio buttons, I encountered a peculiar issue related to indexing. The process involved looping through the 8 radio buttons to check if they had been selected. If all 8 buttons remained unchecked, an alert would be triggered ...

The JavaScript feature designed for activating modal popups is only effective for the initial item

I am in the process of developing a clothing shopping website where the main page displays various clothing items. Each garment has an "Add to Cart" button that triggers a popup modal when clicked. However, I am encountering an issue where the modal only ...

What is the best way to display a particular JavaScript variable in an HTML document?

Is there a way to display the value of a Javascript variable in an HTML form, such as showing it on the screen? Below is my JavaScript code: <script type="text/javascript"> var howLongIsThis = myPlayer.duration(); </script> The variable howL ...

How to reduce the text input field size in Django Bootstrap for a sleeker design

I have a form with various elements like textfields, radio buttons, and text areas. The textfield size is currently too small and does not look good: https://i.sstatic.net/ghimd.png I'm wondering how I can make the textfields slightly larger and why ...

Send an ArrayList to jQuery Flot

Good day. Apologies for any language barriers as English is not my first language. I am a novice in [see tags] and I have a web application that gathers a date and a serial number to execute a SQL query. The query returns some data (measurement values an ...