I am designing a web page with two columns positioned next to each other that will occupy the entire width of the page. Each column should take up 50% of the available width without any margins or padding on either side, and they should stretch to fill 100% of the height based on the screen resolution.
* {
padding: 0;
margin: 0;
}
html,
body {
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
body>* {
flex-shrink: 0;
}
.login-column {
float: left;
width: 50%;
background-color: #F4F6F9;
margin: 0;
}
.news-column {
float: left;
width: 50%;
background-color: #75BFF0;
/* For browsers that do not support gradients */
background-image: linear-gradient(to bottom right, #75BFF0, #C9E7FF);
/* Standard syntax (must be last) */
margin: 0;
flex-grow: 1;
}
<div class="row">
<div class="login-column">
<h1>Login</h1>
</div>
<div class="news-column">
<h1>News</h1>
</div>
</div>
Currently, the divs have no top, left, or right padding or margins; however, the background color only extends to the end of the text content. I aim for the background to reach all the way to the bottom of the page, eliminating the need for a scrollbar.
In terms of using elements, I'm utilizing divs in my layout. Is this still best practice or would it be more appropriate to incorporate newer HTML5 semantic elements like article, aside, etc?