CSS - Height of 100% minus #px - Header and Footer

后端 未结 5 736
名媛妹妹
名媛妹妹 2020-12-25 12:55

The webpage in question looks like this:

// The Header //
/*            */
/*  CONTENT   */
/*            */
// The footer //

Both the head

5条回答
  •  一生所求
    2020-12-25 13:34

    If your browser supports CSS3, try using the CSS element Calc()

    height: calc(100% - 65px);
    

    you might also want to adding browser compatibility options:

    height: -o-calc(100% - 65px); /* opera */
    height: -webkit-calc(100% - 65px); /* google, safari */
    height: -moz-calc(100% - 65px); /* firefox */
    

提交回复
热议问题