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

后端 未结 5 773
名媛妹妹
名媛妹妹 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:37

    #header /* hypothetical name */
    {
        height:100%;
    }
    
    #header p /* or any other tag */
    {
        margin:20px 0 20px 0;
    }
    

    Just make sure to not place margin and height in the same tag. You will experience some crazy results.

提交回复
热议问题