What are the steps to repairing the footer on your website?

Here is the issue I am facing: The footer in my HTML code appears after the grid. How can I fix this problem and make my footer fixed? Below is my HTML and CSS code for reference:



    <footer>
        <li><a href="">Menu</a></li>
        <li><a href="">Menu</a></li>
        <li><a href="">Menu</a></li>
        <li><a href="">Menu</a></li>
        <li><a href="">Menu</a></li>

         </footer>
    css code:   
  footer{

    width: 100%;
    height: 150px;
      background: black;
      display:grid;
      grid-template-columns: repeat(5, auto);
      clear: both;

  }
  li {
      float: left;
  }
  footer li a{
      display: block;
      line-height: 1.5;
  }

Answer №1

Simply adhere to these instructions in order to achieve the desired outcome.

  1. <header> should be closed after the nav
  2. Reposition the comment box below the iframe element
  3. Ensure proper alignment of spacing, width, height, and grid utilization

You can access the fiddle here.

var disqus_config = function() {
    this.page.url = 'http://example.com/2017/08/02/postid=998'; // Replace PAGE_URL with your page's canonical URL variable
    this.page.identifier = '/2017/08/02/postid=998'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};

(function() { // DON'T EDIT BELOW THIS LINE
    var d = document,
        s = d.createElement('script');
    s.src = 'https://coinspy.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
})();
* {
    box-sizing: border-box;
    position: relative;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    background: #161616;
    box-sizing: border-box;
    width: 100%;
}

nav {
    background: white;
    height: 100px;
    width: 100%;
}

nav ul {
    padding: 30px 0 0;
}

ul {
    margin: 0;
    list-style: none;
    padding: 0;
    width: 1
}

ul li {
    float: left;
}

ul li a {
    font-style: 1.5em;
    display: block;
    padding: 1px 20px;
}

nav > img {
    width: 80px;
    position: absolute;
    right: 10px;
    top: 8px;
}

.section1 {
    margin-top: 10px;
    width: 100%;
    height: 400px;
    display: grid;
    grid-template-columns: repeat(3, auto);
    grid-gap: 3px;
    grid-column-gap: auto;
    justify-content: center;
    justify-items: center;
}

.iframe1 {
    border: 1px solid black;
    position: relative;
    margin: 0 auto;
    margin-bottom: 0px;
    margin-bottom: 1px;
    max-width: 640px;
}

.container1 {
    display: grid;
    grid-template-columns: repeat(2, auto);
    height: 300px;
    width: 100%;
}

.box1 {
    width: 300px;
    height: 300px;
    background: red;
    padding: 50px 15px;
    box-sizing: border-box;
}

.box2 {
    width: 300px;
    height: 300px;
    background: red;
}

.box3 {
    width: 300px;
    height: 300px;
    background: red;
}

.side1 {
    width: 180px;
    float: left;
    position: sticky;
    top: 0;
}

side2 {
    width: 180px;
    float: right;
    position: sticky;
    top: 0;
    background-color: blue;
}

footer {
    width: 100%;
    height: 150px;
    background: black;
    display: grid;
    grid-template-columns: repeat(5, auto);
    clear: both;
    text-align: center;
}

footer li {
    float: left;
}

footer li a {
    display: block;
    line-height: 1.5;
}

section2 {
    max-width: 640px;
    margin: 0 auto;
    margin-bottom: 20px;
}

.disqus_thread {
    width: 500px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<header>
    <nav>
        <img src="https://brandmark.io/logo-rank/random/pepsi.png" alt="logo">
        <ul>
            <li><a href="">Home</a></li>
            <li><a href="">Menu</a></li>
            <li><a href="">Contact</a></li>
            <li><a href="">Menu</a></li>
            <li><a href="">Menu</a></li>
        </ul>
    </nav>
</header>
<section class="section1">
    <div class="box box1">
        <iframe width="250px" height="200px" src="https://www.youtube.com/embed/cKGPrOLIt7M" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    </div>
    <div class="box box2"></div>
    <div class="box box3"></div>

</section>
<hr>
<div class="iframe1">
    <iframe SRC="https://www.mp4upload.com/embed-nbyvbffoyerp.html" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=640 HEIGHT=250 allowfullscreen></iframe>
</div>
<section class="section2">
    <div id="disqus_thread"></div>

    <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

</section>
<div class="container1">
    <img class="side1" src="https://via.placeholder.com/1536x2408" alt="">

    <img class="side2" src="https://via.placeholder.com/1536x2408" alt="">
</div>

<footer>
    <li><a href="">Menu</a></li>
    <li><a href="">Menu</a></li>
    <li><a href="">Menu</a></li>
    <li><a href="">Menu</a></li>
    <li><a href="">Menu</a></li>

</footer>

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

Easily automate button clicks on a new tab website

Seeking assistance below, following codes are sourced from "example.com" as assumed: <a href="http://www.example.org" target="vo1" onclick="gp(1)" rel="nofollow">Click Me</a> Upon clicking on ...

splitting up the lengthy list into manageable chunks according to the screen dimensions

How can I make the blue color row-based list (the divs inside a div with id phrase) break on the next line based on the screen size? Any suggestions on additional changes needed in the following CSS? #phrase { color: #fff; position: ...

Fixing the mobile display issue with react-responsive-carousel

I am relatively new to ReactJS and I am looking to develop a responsive Carousel. Here is the code snippet that I have currently: To achieve a responsive Carousel for both desktop and mobile devices, I utilized the react-responsive-carousel library. The ...

Implement jQuery to dynamically assign an "Active" class to tab elements based on the current page being loaded

INQUIRIES I have include: How do I apply a class to an element using jQuery, or any other method, for the active tab? Ensure that the dropdown tab appearing is the one containing the active tab, not always the Company one. In essence, I want the ac ...

Directly within Angular, map the JSON data to an object for easy assignment

I came across this information on https://angular.io/guide/http. According to the source, in order to access properties defined in an interface, it is necessary to convert the plain object obtained from JSON into the required response type. To access pr ...

Exploring Angular2's ability to interpret directive templates using the ng-container

Recently delving into angular2, I ventured into creating dynamic forms and generating fields by following the guide provided in this URL. The result was as expected. The dynamic form component renders each field one by one using ng-container, like shown b ...

406 error is triggered by GET parameters

Here is a PHP script I have: <!DOCTYPE html> <html lang="es-ES" xmlns="http://www.w3.org/1999/xhtml" xml:lang="es-ES"> <head> <meta charset="iso-8859-1" /> </head> <body><p><?php if(isset($_GET['echo& ...

Python script unable to locate div popup using Selenium

Recently, I've been working on enhancing my selenium skills, but I'm facing a challenge in finding a solution to this particular issue. While experimenting with the functionality of the page located at: www.omegle.com When using selenium to cli ...

How to Show an Image in a Search Bar Using HTML

As I put the finishing touches on this table, I decided to add a search function to it. However, I encountered an issue with the search bar design. I wanted to incorporate a search icon png file as the background image, similar to the example showcased on ...

Iterate through each image within a specific div element and showcase the images with a blur effect applied

I have a div with multiple images like this: <div class="am-container" id="am-container"> <a href="#"><img src="images/1.jpg"></img></a> <a href="#"><img src="images/2.jpg"></img>< ...

Issue with manipulating background color with JQuery in CSS

Currently, I have a simple navigation menu consisting of five links. The navigation bar is styled with a background image and changes to a darker shade when hovered over. My goal is to implement a jQuery script that dynamically changes the color of the act ...

Steps for positioning a logo to the left and navigation to the right with HTML and CSS

Could someone assist me in aligning a logo on the left and navigation menu on the right using HTML and CSS? I envision it to look like the image displayed. I have tried various approaches to adjust my CSS styling, but nothing seems to be working as inten ...

The issue of the back button not functioning in the React Multi-level push menu SCSS has

I have been developing a mobile-friendly Multi-level push navigation menu for my website using dynamically generated links based on projects from my GitHub account. I found a push menu on CodePen here and am in the process of integrating it into React inst ...

Adding turbolinks to an HTML document can be achieved without the need for a

Recently delving into the world of turbolinks, I discovered that it can be employed independently without relying on a client-side javascript framework. Eager to test this out, I created a bootstrap 4 template and attempted to install it. Firstly, I downl ...

Adjust the size of the font based on the screen resolution

What is the best way to adjust font size based on screen resolution so that text remains as a single line when the screen is small? For example: http://prntscr.com/2qa9ze <div class="centerbreaking"> <section id="breaking-news"> <div id ...

Creating a responsive HTML, CSS, and JavaScript popup: A step-by-step guide

I'm facing a challenge in making my HTML, CSS, and JavaScript popup responsive. Despite looking into various resources, I haven't been able to find a solution that fits my code. However, I am confident that it is achievable to make it responsive! ...

What is the best way to widen each tab so they fill up the entire width of the content block?

As a newcomer to both programming and this website, I've been exploring various codes for creating vertical and horizontal tabs. I have a specific query about this particular example found at https://jsfiddle.net/eu81273/812ehkyf/: My goal is to adju ...

How can I eliminate the empty spaces around a bar chart in Kendo UI?

Struggling to eliminate the extra space surrounding the Kendo UI chart below. Could this be due to a gap or spacing issue? The goal is to create a single-line bar chart with only grey appearing on the right side. Access JSFiddle Codes Here $(doc ...

Is it possible to resize a Div using pure CSS?

Here is the HTML structure I am working with: <div class="outer"> <div class="inner"> <a href="#"/> <a href="#"/> <a href="#"/> </div> </div> This is the corresponding CSS: div.outer{ position:relative; ...

Just dipping my toes into Django/Python and feeling completely bewildered by why my webpages won't connect

I'm having trouble with my webpage links. It seems like the file paths are incorrect. I've attempted to link three pages: The homepage The 'artists' icon on the top right of the homepage, linking to 'registerprofessional.html&apo ...