Search
 
SCRIPT & CODE EXAMPLE
 

HTML

sticky footer css grids

<!doctype html>

<html lang="en">

<head>
    <meta charset="utf-8">
    <!-- this is an example from the MDN Layout Cookbook -->
    <title>CSS Cookbook: sticky footer</title>

    <link rel="stylesheet" href="styles.css">

    <style>

        html {
            height:100%;
            box-sizing: border-box;
        }

        body {
            height:100%;
            background-color: #fff;
            color: #333;
            font: 1.2em / 1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
            padding: 0;
            margin: 0;
        }

        * {
            box-sizing: inherit;
        }

        section {
            height: 100%
        }

        .wrapper {
            min-height: 100%;
            display: grid;
            grid-template-rows: auto 1fr auto;
        }

        .page-header,
        .page-footer {
            background-color: rgb(75, 70, 74);
            color: #fff;
            padding: 20px;
        }

        .page-body {
            padding: 20px;
        }
    </style>



</head>

<body>
    <section>
        <div class="wrapper">
            <header class="page-header">This is the header</header>
            <main class="page-body">
                <p>Main page content here, add more if you want to see the footer push down.</p>
            </main>
            <footer class="page-footer">Sticky footer</footer>
        </div>
    </section>
</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Html :: canvas drawImage wrong size image 
Html :: ionic grid no margin 
Html :: player 
Html :: html body background color 
Html :: Script to provinces, states, countries 
Html :: How to change text every 3 seconds 
Html :: in line a frame animation 
Html :: how to pan in mac preview 
Html :: download file from link html 
Html :: best meta tags 
Html :: html one page template free 
Html :: how to check password and retype password in html 
Html :: html code for list box with checkbox 
Html :: html range start value 
Html :: h1 tag is used for 
Html :: what is participe passe 
Css :: css textarea background color transparent 
Css :: css center elment screen 
Css :: @media between two sizes 
Css :: css spread children horizontally 
Css :: css code to make text bold 
Css :: css no selection 
Css :: center position fixed element 
Css :: borders for tables in html/css 
Css :: tailwind nowrap 
Css :: border: 1px solid black; 
Css :: how to filter css red 
Css :: ion input change font size 
Css :: css @media measurements 
Css :: css device orientation 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =