Why section of web page overlaps the header even if the position of header is fixed

ABINBENNY

I fixed the position property of header as fixed,but it is not working.

When I scroll down the page in mobile view, the section part of web page overlaps the header part.The home section in this code works properly whereas About section is not work in proper manner.Inorder to make webpage responsive I already added css and js file in my code,but it is not mentioned here.

    <body>
    <header>
        <div class="row">
            <div class="col-3 col-md-6" id="logo">
                <a class="logo" href="#">Xyz<span>Abc</span></a>
            </div>
            <div class="col-9 col-md-6">
                 <nav class="navbar navbar-expand-lg navbar-light">
                     <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
                         <div class="navbar-nav">
                            <a class="nav-item nav-link" href="#">Home <span class="sr-only"> 
                            (current)</span></a>
                           
                         </div>
                     </div>
                 </nav>
            </div>
        </div>
    </header>
    <section class="home">
            <div class="row">
                <div class="col-12">
                    <h2>Hello,I'm Xyz Abc</h2><br>
                    <p>I am Developer</p><br>
                    <p>Let's start <span>Scrolling</span>  and know more <span>About Me.</span> </p>
                </div>
            </div>
    </section>
    <section class="about">
        <div class="container-fluid">
            <h3>About Me</h3>
            <div class="row">
                <div class="col-sm-5 col-12 bg-danger">
                     <img src="profile.jpg">
                </div>
                <div class="col-sm-7 col-12 bg-info">
                     <h5>I am Xyz Abc and I'm a <span>Developer</span></h5>
                </div>
            </div>
        </div>
    </section>
    </body>
    </html>

Css Page:

        *{
        margin:0;
        padding:0;
        text-decoration:none;
        width:100%;
        }
        header{
        font-family:sans-serif;
        position:fixed;
        background-color:green;
        height:70px;
        width:100%;
        }
      .home{
      display:flex;
      background-image: url("a4.png");
      width:100%;
      height:100vh;
      padding-top:60px;
      }
      
    .about{
    padding-top:150px;
    width:100%;
    }
   .about .row {
    width:100%;
    }
    
Jonabc7

You can use the boostrap class fixed-top in your header tag

<header class="fixed-top ">
.
.
.
</header>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

section position: fixed overlaps footer

From Dev

jQuery Mobile Dialog Page - Fixed Position Header

From Dev

fixed position header overlapping

From Dev

Fixed position not working for header

From Dev

Offset an anchor section for a fixed header

From Dev

Header Div position fixed on top of page but on load show a div on top of it

From Dev

Fixed header section with scrollable bottom section

From Dev

Header is disappearing when the position is fixed

From Dev

Scroll to anchor position with fixed header

From Dev

"position:fixed" Not Working For Header Menu

From Dev

How to make web page content scroll over a fixed header?

From Dev

How to make web page content scroll over a fixed header?

From Dev

Fixed Header only on one page

From Dev

Resolving overlap between fixed header and first section

From Dev

Resolving overlap between fixed header and first section

From Dev

Responsive design layout CSS menu position overlaps header logo

From Dev

CSS position:fixed is working for the header but not for the footer

From Dev

Fixed header position in bootstrap 3 modal

From Dev

CSS Position fixed not fixing header to top

From Dev

Css position fixed on header hides content

From Dev

Sticky header slide into fixed position from top

From Dev

Adjust position of DIV beneath fixed header PHP

From Dev

Position: Fixed - pushing my footer over header

From Dev

Anchors not working when header's position is fixed

From Dev

Why there is a First Page Header -Section 4- after specif page in MS-Word

From Dev

page layout with header section main and footer tag

From Dev

Change the position of the header section with proportion to visible content section

From Dev

Adding a fixed header/footer for each page jsPDF

From Dev

fixed page, content scrolling behind header

Related Related

  1. 1

    section position: fixed overlaps footer

  2. 2

    jQuery Mobile Dialog Page - Fixed Position Header

  3. 3

    fixed position header overlapping

  4. 4

    Fixed position not working for header

  5. 5

    Offset an anchor section for a fixed header

  6. 6

    Header Div position fixed on top of page but on load show a div on top of it

  7. 7

    Fixed header section with scrollable bottom section

  8. 8

    Header is disappearing when the position is fixed

  9. 9

    Scroll to anchor position with fixed header

  10. 10

    "position:fixed" Not Working For Header Menu

  11. 11

    How to make web page content scroll over a fixed header?

  12. 12

    How to make web page content scroll over a fixed header?

  13. 13

    Fixed Header only on one page

  14. 14

    Resolving overlap between fixed header and first section

  15. 15

    Resolving overlap between fixed header and first section

  16. 16

    Responsive design layout CSS menu position overlaps header logo

  17. 17

    CSS position:fixed is working for the header but not for the footer

  18. 18

    Fixed header position in bootstrap 3 modal

  19. 19

    CSS Position fixed not fixing header to top

  20. 20

    Css position fixed on header hides content

  21. 21

    Sticky header slide into fixed position from top

  22. 22

    Adjust position of DIV beneath fixed header PHP

  23. 23

    Position: Fixed - pushing my footer over header

  24. 24

    Anchors not working when header's position is fixed

  25. 25

    Why there is a First Page Header -Section 4- after specif page in MS-Word

  26. 26

    page layout with header section main and footer tag

  27. 27

    Change the position of the header section with proportion to visible content section

  28. 28

    Adding a fixed header/footer for each page jsPDF

  29. 29

    fixed page, content scrolling behind header

HotTag

Archive