html body,simple form with table and two divs inside(login and table):
<body>
<div id="container">
<form>
<div class="login">
<div class="table">
<table class="userInput">
<tr>
<td><input type="text" placeholder="Username" id="username"
name="login"></td>
</tr>
<tr>
<td><input type="submit" value="submit"></td>
</tr>
</table>
</div>
</div>
</form>
</div>
</body>
My css:
html,body {
margin: 0;
padding: 0;
height: 100%;
}
table.userInput {
margin-top: 15%;
width: 100%;
height: 100%;
}
div#container {
background: pink;
height: 100%;
}
div.login {
background-color: black;
margin-top: 15%;
margin-left: auto;
margin-right: auto;
height: 10%;
width: 10%;
padding: 10px;
}
div.table {
width: 100%;
height: 100%;
background-color: grey;
}
Need my div class="table" after margin-top:15% of table class="userInput" visible with grey background but after offset i can see black color of login div class="login". How to make it grey with margin-top?