Footer displaying incorrectly

My webpage has a white footer set at 30px in height. However, when I scroll down the page, the footer expands and overlaps with the text part (a div with a light grey background). Can you help me figure out what's causing this issue and how to fix it? Check out the Jsfiddle here: http://jsfiddle.net/Grek/AdX3m/ Thank you!

Here is a screenshot:

CSS:

@charset"UTF-8";
/* CSS Document */
body:before {
    content: "";
    position: fixed;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    -webkit-box-shadow: 0px 0px 10px rgba(0,0,0,.8);
    -moz-box-shadow: 0px 0px 10px rgba(0,0,0,.8);
    box-shadow: 0px 0px 10px rgba(0,0,0,.8);
    z-index: 100;
}
Html, body {
    padding: 0;
    margin: 0;
    height: 100%;
    font-family: 'Open Sans', sans-serif;
}
#header {
    width: 100%;
    height: 60px;
    border-bottom: 1px dotted #CCC;
    background: #F2F2F2;
}
#logo {
    position: absolute;
    left: 20px;
    top: 35px;
    color: #000;
    font-size: 20px;
}
#header-text {
    width: 400px;
    position: absolute;
    top: 70px;
    left: 20px;
    font-size: 12px;
    font-weight:300;
    color: #FFF;
}

... (remaining CSS code) ...

HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

... (remaining HTML code) ...

Answer №1

remove the style from footer section

position:static;

adjust the height or font size to keep the footer at the bottom

Answer №2

When you scroll down, the height of your footer remains constant and does not change. The issue seems to be related to the heights of your elements, specifically #wrap, which is affecting the styles for background-color that you have defined...

Instead of applying background color styles to #wrap, consider applying them to body

body { background: #0063C3; ... }

This approach may resolve the problem you are experiencing.

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

Looking to enlarge a few CSS classes, but unsure of the best approach

My app has some CSS code that I found, but it's too small. Can anyone help me increase the size by 150%? I am using React-Bootstrap for styling, so I'm looking for a way to enlarge the element without adjusting every attribute in the CSS classes. ...

When utilizing the 'checkAll' method in a Bootstrap table, it will only select the checkboxes displayed on the current page

I currently have a Bootstrap table on my HTML5 page. When I use the code $('#bk-table').bootstrapTable('checkAll'), only the checkboxes on the current page are checked. Is there a way to check all the checkboxes on all pages? Here i ...

Experimenting with combining a CSS class alongside the Nth-child selector

Hello, I've been researching various sources including Stackoverflow on how to effectively use an Nth child selector and a Class together but have not had much success so far. In essence, my menu consists of Main categories (class = cat) and subcateg ...

Change the blue line to a crisp, clean white

Is it possible to customize the color of the blue line that appears when clicked? class Greetings extends React.Component { render() { return <div>Greetings {this.props.name}</div>; } } ReactDOM.render( <div> <p tabInde ...

Retrieve isolated scope of directive from transcluded content

I am not certain if it is possible, but I am essentially looking for a reverse version of the '&' isolate scope in AngularJS. You can check out this Plunkr to see an example. In essence, I have created a custom directive that provides some r ...

Secure your website against XSS attacks with DOMPurify

Currently I am working on resolving a cross-site scripting (XSS) vulnerability using DOMPurify. The issue lies in the URL provided below: https://stage-xyzmysite.com/login/?rUrl=javascript:alert('hi'). In order to create a proof of concept, I am ...

Conceal a div using jQuery when clicked

I am facing an issue with my script where I need to make a div close only after clicking on a link, instead of anywhere outside the div. http://jsfiddle.net/N4pbP/ $(function() { $('#hidden').hide().click(function(e) { e.stopPropagation() ...

What is the best way to display the loan detail and credit detail tables beneath the application detail section that is currently blank?

I have a total of four tables on my page. The size of one table is almost identical to the other three smaller tables. I am looking to place the loan details and credit details table below the application detail, in a way that utilizes the empty space avai ...

Utilize a while loop in JavaScript to trigger a message when a variable dips below zero

Forgive me if I seem clueless. I am a beginner in the world of Javascript and am currently experimenting with loops. At the moment, I am toying around with this particular piece of code: <!DOCTYPE html> <html> <body> <button oncl ...

Using setTime in JavaScript allows for customizing and adjusting the

I'm having trouble getting this code to display the time. I thought it would work, but it's not showing the time. Can someone please help me figure out what's going wrong? function startTime() { var currentTime = new Date(); ...

Minimizing Jitter in HTML5 and JavaScript Applications

I am currently working on developing a metronome as a hobby using JavaScript/HTML5 with the intention of turning it into a FirefoxOS app. One issue I've encountered is Jitter, which is unacceptable for Metronomes. As JavaScript is single-threaded and ...

Load an external script once the page has finished loading by leveraging the power of $(document).ready() in conjunction with $.getScript()

Is it possible to load a script in the header of a website instead of at the bottom? I've been trying but it's not working as expected. Here is an example of what I'm attempting: HTML file: <!DOCTYPE html> <html lang="en"> < ...

Organize elements in a grid using CSS styling

I have designed a layout using grids, featuring two menus on the left and right, with a central area for content. Within the content area, there is a 4x4 grid layout. Here's an example of the 4x4-grid layout: https://codepen.io/mannberg/pen/qemayy h ...

How can I use jQuery to check a checkbox without triggering its bound event?

I've created a custom checkbox that will log its value to the console, and I'm trying to add a button that can tick the checkbox without triggering the checkbox event. This is purely for educational purposes. $(document).on('click', ...

Troubleshooting Issue with Nested ng-include in AngularJS: Difficulty arises when the parent element with the ng-include attribute is dynamically added using the ng-

Click here to see a demo plunker that will help you understand my issue. On my main page, I have a table. Each table row is followed by a hidden empty row. When the first row is clicked, I use a directive to inject HTML into the empty row below it. Main ...

Developing a variety of jQuery tabs

I am encountering an issue with my ASP.NET MVC page where dynamically created divs within a jQuery tab are not displaying subtabs as expected. Although the parent tabs are rendering correctly, the subtabs are not being created for some reason. The Razor ...

Avoid opening the page when attempting to log in with jquery, ajax, and php

I am facing an issue with my code. I have a file named "index.html" which contains a login form. Another file called "dash.js" retrieves the username and password from the login form and redirects to "connectdb.php" to check the login credentials with the ...

Generating a PDF file from an HTML and CSS page can be done without relying on APIs or libraries, by leveraging the

Is there a way to directly convert an HTML page generated using PHP and CSS into a PDF format without the use of libraries? I have come across multiple libraries that can accomplish this task, but I would prefer not to rely on any external libraries and i ...

What might be causing my CSS selector to be considered as invalid?

Looking to utilize the database ID below as a selector 5b4bb7d2685cfb094b1d46c3 Here is the snippet: document.querySelector('#5b4bb7d2685cfb094b1d46c3') <button id="5b4bb7d2685cfb094b1d46c3"> However, when trying the selector, an erro ...

Employing Bootstraps data-spy and data-toggle features with a button

Is it possible for a button to not only toggle a hidden accordion but also scroll the page to that section? Currently, my code is working great with navigation, but I'm struggling to make the button display text and scroll to the top of the section. ...