.bcimg{ position: relative; z-index: 1; background-image:url(cafebgc.jpg); background-repeat:no-repeat; background-size: cover; height:100%; } .bcimg::after{ content: ""; position: absolute; z-index: 2; width: 100%; height:100%; top: 0; left: 0; background-color: white; opacity:0.6; } .bcimg>h2{ position: relative; z-index: 3; } .cent{ display:block; text-align:center; color :white; margin-left:auto; margin-right:auto; } .nav{ display:flex; list-style:none; color:white; text-align:center; } .nav li{ padding:25px; margin-left:45px; } .nav li:hover{ color:#305089; background:#ffd700; } footer{ background:#432; text-align: center; padding:20px; } footer p{ color:white; font-size:0.85em; }