Close the space between the final div and the bottom of the page on Firefox, Opera, and Safari

When designing a web page, I encountered an issue with the layout. I have a large white div followed by a red div. If the white block's height is equal to or greater than the browser window, causing scroll bars to appear, there is a gap between the red div and the end of the window in Firefox, Safari, and Opera:

However, in Internet Explorer and Chrome, everything displays correctly.

Here is my code:

<!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">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title></title>
    <style type="text/css">
        root { display: block; }

        html, body{
            padding: 0;
            margin: 0;
            width: 100%;
            height: 100%;
            font-family: Tahoma;
            background-color: blue ;
        }

        #container{
            position: absolute;
            left: 50%;
            width: 961px;
            height: 100%;
            margin-left: -480px;
        }


        .infContainer{
            position: relative;
            padding-left: 19px;
            background-color: white;
            color: #434343;
        }

        div#footerCopyright{
            position: relative;
            bottom: 15px;
            font-size: 0.75em;
            background-color: red;
        }

        div#bottomFooterDivider{
            height: 50px;
        }


        div#pageBottomDivider{
            height: 35px;
        }
    </style>
</head>
<body>
    <div id="container">

        <div id="mainBlock" class="infContainer">
            <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
            <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
            <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
            <br/><br/><br/><br/><br/><br/>
        </div>


        <div id="footerCopyright">
            <div id="bottomFooterDivider"></div>
        </div>
    </div>

</body>
</html>

To solve this problem and eliminate the blue gap in Firefox, Opera, and Safari, please visit the actual page for reference: .

Answer №1

The footerCopyright section has been styled with

position: relative; bottom: 15px;

In Firefox, adjusting the bottom value to 0 aligns it perfectly at the bottom.

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

Utilize an ion-searchbar along with a FormGroup to ensure that searches are only performed when the entered value meets the minimum

I am attempting to create a search feature that will only begin searching when the inputted value is 3 or higher However, the method I have tried so far has not been successful :( Home.page.html <form [formGroup]="search"> <ion-se ...

unusual occurrences with CSS and JavaScript when hovering over TEXTAREA or A elements

Lately, I've been facing an unusual issue in my web application (php) that was fine just a month ago. Upon hovering over a specific < TEXTAREA > or two buttons (add, exit) within a DIV, the background color of the DIV fills up, rendering the IN ...

What is the best way to horizontally position two divs side by side?

I am trying to arrange two divs next to each other, each containing a title and a list of items. Here is an example: <div> <span>list of sources</span> <select size="10"> <option /> <option /> ...

Chrome is throwing a syntax error with an unexpected token in jQuery replaceWith

jQuery('div#top').replaceWith('<div id="top"> </div>') When I try to replace the entire content of the top div using jQuery, Chrome gives me an error: "Uncaught SyntaxError: Unexpected token" on the first line. I'm no ...

position a div element at the bottom of its parent container

I am facing a challenge with this issue: I want to position a red div at the bottom of another div. The red div should always stay at the bottom of its parent div. .homepage-wrapper{ max-width: 1028px; margin-left: auto; ...

Is :before functionality not compatible with img tags?

Is there a way to use the :before selector in CSS to overlay an image on top of another image? I have tried implementing it, but it seems that placing an image before an img element doesn't work as expected. Here is the CSS code I am using: .containe ...

The issue I'm facing is with the Infinite Scrolling Background Image zooming out of the page width. Any suggestions

I am working on a page design that requires an Infinite Scrolling Background Image with a looping effect to create the illusion of infinity. On top of this background, a content card is displayed. However, the image extends beyond the page width on smaller ...

Utilizing CSS to Select Specific Sections

I'm curious about how to target a section element with a specific id like #dress in CSS3. Here is my code snippet: <section id="dress"> <p>Lorem Ipsum..................................of Lorem Ipsum.<> </section> Here's ...

Utilizing the <a> element within a Thymeleaf loop

I'm looking to use Thymeleaf to display a list of links in my project. Below is the code I used successfully for displaying the links: <div class="col-12 col-md-6" th:each="ApplicationVO: ${ApplicationList}"> & ...

Tips on swapping out an image multiple times as you hover over various text options

As a Designer creating a portfolio website, I have a good understanding of HTML and CSS. Here is my homepage: https://i.sstatic.net/WWMPA.png I am looking to create a feature where different images are displayed in a red circle preview when hovering over ...

Facing difficulties with the XPATH due to an inability to access specific parts of the HTML code

Currently, I am facing an issue where I need to click on a link using Selenium and Java. When searching for the link using XPath, I am encountering a problem where only white spaces are displayed instead of most of the webpage content. The highlighted link ...

Adjust the height seamlessly on the homepage without the need for scrolling, while maintaining a stationary navigation bar and footer

Our latest project is designed specifically for mobile use. The fixed navigation bar is functioning perfectly. We also have a fixed footer with icons at the bottom. (All working well) The challenge we are facing is to make the content between the naviga ...

What You Need to Know About Hovering and Highlighting Buttons Using CSS

As a beginner in CSS, I decided to practice padding and margin mechanics by creating two buttons. Now, I'm trying to make the buttons larger without one button pushing the other out of place. I managed to achieve this for the save button, but I'm ...

Mobile-friendly website with consistent design across all devices

Can you help me figure out how to make my website appear at its normal size on mobile devices? I want the entire website to be visible without the need for scrolling, but still allow users to zoom in if needed. I've already tried: <meta name=" ...

Update the HTML table by changing the first cell in the first row to span multiple

I currently have a table structured like this: <table> <thead> <tr> <th></th> <th>Col1</th> <th>Col2</th> <th>Col3</th> <th>Col4& ...

Hover over this area to reveal the hidden text as it slides into view

My goal is to hover over truncated text and reveal the full length of the dynamic text. However, I am struggling with removing extra space at the end of shorter text when hovered and displaying all the text for longer ones. I have a solution that almost w ...

Dealing with interstitial advertisements on mobile devices: What is the best approach for handling zoom?

I am facing a challenge with displaying interstitial ads on mobile sites. Different publishers may have varying viewport settings and initial scales on their mobile sites, making it difficult to ensure that the ad appears correctly on all devices with the ...

When we need to select the button with identical class and name attributes and click to activate it

Is there a way to click a button with the same class name and name attribute as another element without using the xpath method? input class="btnstyle greenbtn paddinglr20" type="submit" value="Upload " name="submit_upload I attempted this for the second ...

Having trouble adjusting the vertical position of jQuery Spinner buttons

I'm attempting to customize the jQuery spinner with styling applied like this: <span class="ui-spinner ui-widget ui-widget-content ui-corner-all" style="height: 14px;"> <input id="testSpinner" class="ui-spinner-input" name="value" aria-value ...

How can I make inline-block items align with the top of the parent element?

Take a look at: http://jsfiddle.net/kdcmq/86/ #parent { position: relative; width: 500px; height: 500px; background: red; } #child { display:inline-block; width: 100px; height: 100px; background: blue; top: 0; left: 100% } Is it possible to alig ...