Home > Blockchain >  After placing the footer at the bottom of the page, container property max-width no longer works
After placing the footer at the bottom of the page, container property max-width no longer works

Time:12-11

Scenario:

This is the HTML for both cases:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <div id="__next">
      <div >Content</div>
      <div >Footer</div>
    </div>
  </body>
</html>

#CASE1: Here is the code snippet, where I haven't applied my solution to push the footer to the bottom of the page and as You can see: the container div takes the exact space of max-width: 1780px;.

Check live: solution

  • Related