I am currently experiencing an issue where two rectangular divs, which are supposed to be calculated using percentage based width and height, are not appearing on my webpage. Here is the HTML code I have in the body section:
<div class="brd"></div>
<img src="res/logo-art.png" alt="Logo Artwork" align="middle" width="100%">
<button class="btn btn-default" id="login">Login</button>
<button class="btn btn-default" id="register">Register</button>
<div class="brd"></div>
Below is the CSS code that corresponds with the HTML above:
.brd {
position: relative;
width: 100%;
height: calc(50% - 315px);
background: #606060;
}
Given that the height of the page is 854px, I calculated the height of each div to be 112px. The png image's height is 475px. However, despite these calculations, the inspector is showing that the height of each div is actually 0px.