Your .banner
is not taking the height 20% from css. The reason is it does not have a parent element having height set. So here I have added height: 100%
to html
and body
. Try the below example.
html,body{
height: 100%;
}
.banner {
width: 100%;
height:
…
Top comments (0)