css position fixed not working at all

后端 未结 5 1587
暖寄归人
暖寄归人 2021-01-27 14:36

I am looking to make a footer type thing for blakehawley.com where it has some different links and such. It is supposed to be a banner style, and by that I mean it is supposed t

相关标签:
5条回答
  • 2021-01-27 15:08
    #menu{
    position:fixed;
    bottom: 0px;
    height:200px;
    width:1218px;
    border:3px solid green;
    box-shadow:0px -5px 5px #888888;
    }
    

    Guess did should do the trick, changed second rule

    (Maybe make the width: 100% as well)

    0 讨论(0)
  • 2021-01-27 15:13

    Why isn't "position:fixed;" keeping my page header in the same place?

    this happens due to display:flex for #pageTitle. The menu when expanded tries to fit in, pushing other elments in the same parent div. Separate .responsive-menu from #pageTitle into a new div.

    0 讨论(0)
  • 2021-01-27 15:23

    First the menu tag is empty(you cant see it becouse of it).

    Second you didnt position it with using the properties left,top,bottom or right.

    and Third there isn't such thing like "float:bottom;"

    0 讨论(0)
  • 2021-01-27 15:27

    Float is for an image inside some text, can be left or right, instead of float, you should use positioning, in your case :

    bottom:0px;
    

    also, if you want your footer to take the whole screen, use

    width:100%;
    
    0 讨论(0)
  • 2021-01-27 15:28
    #menu{
    position:fixed;
    margin:0 auto;/*use it if you want to show middle of the webpage if not remove it*/
    left:/* put*/ px;/* use it if you want to move your div from the left postion*/
    height:200px;
    width:1218px;
    border:3px solid green;
    box-shadow:0px -5px 5px #888888;
    }
    
    keep remember float:bottom is not correct rule more info visit www.w3schools.com ! 
    
    0 讨论(0)
提交回复
热议问题