Multiple vertical 100% height & width divs

后端 未结 2 1435
挽巷
挽巷 2021-01-24 05:38

I\'m trying to create multiple divs with 100% both width & height, but keep failing miserably. Example:



    
2条回答
  •  情歌与酒
    2021-01-24 06:00

    From what I understand of HTML and CSS if you create 2 divs that have a width and height of 100% and place them in the same containing div, you will only see 1 of the divs because they are both the exact same height and width and are placed on top of each other.

    EDIT: Sorry I was thinking of inline elements and z-index (here is the code to get what you want done, if I am reading your post correctly

    
    
        Test
        
    
    
        

    I hope that works!

    EDIT: You can change the container div to be whatever height you want it to be to further customize this :D, now you can use your intuition to create what you were hoping to create!

提交回复
热议问题