The bottom section of the main page

I've successfully implemented a footer that sticks to the bottom of each page as intended. However, I'm facing an issue when there's a large amount of text on a particular page that requires scrolling. The scroll continues beyond the footer, causing it to overlap with the bottom content of the page.

My goal is to have the site scroll while ensuring that the footer remains below and not over the page content. How can I achieve this?

Below is my master page:

HTML code:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="Styles/MasterStyleSheet.css" rel="stylesheet" />
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
    <script type="text/javascript" src="<%= Page.ResolveUrl("~/Scripts/ShoppingCartSideMenuJavaScript.js") %>"></script>
    <script type="text/javascript" src="<%= Page.ResolveUrl("~/Scripts/MasterMenuJavaScript.js") %>"></script>
    <title></title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
        <div id="mask">
        </div>
        <div id="ShoppingCartSideMenu">
            <div id="CartMenuTop">
                <div>
                    <img id="menu-close" src="/Images/Icons/X-icon.png" />
                </div>
                <div id="CartHeader">
                    Cart
                </div>
            </div>
        </div>

        <div class="wrapper">
            <h1 id="SiteTitle">JEWELRY</h1>
            <p id="UnderSiteTitle">EXCLUSIVE SWISS MADE JEWELRY</p>
            <div id="menu">
                <ul>
                    <li><a href="Home.aspx">HOME</a></li>
                    <li><a href="Shop.aspx">SHOP</a></li>
                    <li><a href="About.aspx">ABOUT</a></li>
                    <li><a href="TermsAndConditions.aspx">Terms & Conditions</a></li>
                    <li><a href="Contact.aspx">CONTACT</a></li>
                    <li id="seperator">|
                    </li>
                    <li>
                        <div id="CartImage">
                            <a id="ShoppingCartBtn">
                                <img class="ShoppingCart" src="/Images/Icons/Shopping_cart.png" />
                                <label id="CountCartItems">0</label>
                            </a>
                        </div>
                    </li>
                </ul>
            </div>
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </div>

        <footer>
            <div class="FooterWrapper">
                <div id="FooterDiv1">
                    &copy; 2016 JEWELRY - Created by nirh1989
                </div>
                <div id="FooterDiv2">
                    <a href="#">
                        <img id="FooterFacebook" class="Icons" alt="Facebook" src="/Images/Icons/facebook-logo.png" /></a>
                    <a href="#">
                        <img id="FooterTwitter" class="Icons" alt="Twitter" src="/Images/Icons/twitter-logo.png" /></a>
                    <a href="#">
                        <img id="FooterInstagram" class="Icons" alt="Instagram" src="/Images/Icons/instagram-logo.png" /></a>
                </div>
            </div>
        </footer>
    </form>
</body>
</html>

CSS code:

body {
}

form {
    margin-bottom: 100px;
}
/* Additional CSS styles are included in the original text */

To better understand the issue, please refer to the image example https://i.stack.imgur.com/I4LmR.png

Answer №1

Sure thing! Adjust the footer on your website by setting it to have a position of absolute, with bottom, left, and right all set to 0. And don't forget to include the following code within the body tag:

body{
    position: relative;
    padding-bottom: 15rem;
}

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

Please provide me with an alternative version

I am having an issue with a field that is supposed to accept all characters and digits, including English and Arabic, but not special characters like ~!@#$%&*.()[]{}<>^+=:,;?/\' Specifically, only special characters will be conside ...

Whenever I adjust the layout of the navigation bar, the edges end up getting clipped

I'm having trouble with the border shape of my navbar. When I try to make it a rounded pill shape, the edges get cut off instead of being properly displayed. https://i.stack.imgur.com/sUN2Y.png Below is the HTML template: <template> <div cl ...

Configure the input to accept integer values

This page that I have developed is designed for entering Latitude and Longitude values. <div class="container "> <form class="entry"> <div class="aligncenter"> <h5 style="color:MediumTurquoise; font ...

Electron does not prioritize the @css prefers-color-scheme option

I recently completed an Electron project and decided to incorporate dark mode support into it. However, for some reason, the dark mode feature is not functioning properly. Below you will find the dark.css styling that I have included in every page: @medi ...

Is there a problem with addEventListener returning false?

What does keeping the third parameter as false in the line below signify? var el = document.getElementById("outside"); el.addEventListener("click", modifyText, false); ...

While reviewing my HTML code, I couldn't locate a particular line of code responsible for changing the display of my webpage. However, upon inspecting the element, I discovered that

<h2><a class="label label-info" target="_blank" href="http://www.avis.com.pk/"> Avis</h2> </a> <h4> <span class="label label-primary"> Rent A Car Service</span></h4> There is an Inspect Element image attach ...

Optimize your website by reducing the size of CSS, JavaScript, and HTML files through NUXT's

I'm currently working on a project in NUXT utilizing yarn for managing packages. My objective is to compress (and potentially merge) js, css, and html files to enhance load time efficiency. I came across "https://www.npmjs.com/package/nuxt-compress" ...

Switch out the image source and add attributions until the AJAX call is complete

<div id="fbAdsIconDiv" class="social_icon"> <img src="~/Content/images/fbAdsAddOn_1.png" onclick="toggleImage(this)" id="fbAdsAddOn" data-toggle="tooltip" title="click to enable" class="confirmBox f ...

javascript - Retrieving a JSON string

I am currently working on a stock website where I need to retrieve JSON information from either Google's API or Yahoo's API. To test this functionality, I have used a replacement function to log the data onto a text box for testing purposes. Howe ...

Creating a series of spots arranged in a semi-transparent line using JavaScript for a unique canvas

My attempt at creating a highlighter is encountering issues with transparency The problem might be due to using lineCap=round, resulting in multiple dark spots appearing in a single line (which shouldn't happen). It's difficult to fully describe ...

Adding the target='_parent' attribute to the infowindow of a Google Fusion Map by utilizing a click event listener

As someone who is relatively new to Google Fusion, I am eager to expand my knowledge and skills. Recently, I created a customized map with an infowindow and embedded it onto my website using the FusionTablesLayer Wizard. I wanted to avoid using the target= ...

Troubleshooting Bootstrap 4 Content Alignment Issue: Centering Horizontally and Vertically

Having trouble centering my content both vertically and horizontally within the body of the webpage using Bootstrap 4. Despite trying various solutions from the documentation and StackOverflow, I can't seem to get it to work. Would greatly appreciate ...

Having issues with jQuery's .hover and .mouseleave functions causing unintentional looping. Any suggestions on how to resolve this

What I want to achieve: When hovering over the image, it fades out. Text should fade in after the image fades out. Text should fade out when the mouse leaves. The original image should fade back in. End with the original image and no text displayed. Iss ...

The hovering effect on the image link is causing the surrounding div to stretch too far

Whenever I hover over specific points below an image link wrapped in a div, it triggers the hovering effect for the CSS-created image link. Despite trying various solutions like overflow:hidden and display:inline-block, nothing seems to resolve this issue. ...

jQuery animation that smoothly fades out from the left and fades in from the right

This survey is designed to assist individuals in determining where they should go with a specific type of ticket. Currently, everything is functioning smoothly, but I would like to add a sleek animation to each ul transition. Whenever a button is clicked ...

Leveraging Intelligencia.UrlRewriter for creating deceptive subdomains

I am attempting to use "Intelligencia.UrlRewriter" to rewrite URLs to a subdomain page with specific query strings. For instance, I want to rewrite "" to "" Below is the code snippet from my web.config file which includes the "rewriter" tag: <rewrite ...

Error: The EJS compiler encountered a SyntaxError due to an unexpected token || in the show component file located at /var/www/html

I'm currently working on a project inspired by Colt Steele's YelpCamp creation during his Udemy Web Dev Bootcamp. Everything was going smoothly until I tried to refactor some code towards the end of the course using YouTube tutorials. Now, whenev ...

What is preventing me from applying styles to the first word in my Angular ngFor iteration?

I'm currently attempting to customize the initial word of a string within my Angular ngFor loop. Strangely, the class gets applied but the style defined in my CSS file is not. Inline styling also does not seem to work - any ideas why? This is the CSS ...

Issues encountered when attempting to utilize removeEventListener() with multiple elements within a for loop in Javascript

After experimenting, I have been exploring ways to avoid encountering repeated event listeners The script provided below iterates through all buttons with a specific attribute. However, the issue is that it only functions effectively for a single button ...

Having an issue with CSS button borders not functioning as expected for some unknown reason

My CSS button has a border added, but it doesn't seem to be showing up. Can anyone provide suggestions on how to fix this issue? Below is the snippet of the code: body { background: grey; } a.button { display: inline-block; -webkit-appearanc ...