Hello!
I've got a problem with this simple code. Margin-bottom does not appear
Thanks!
I've got a problem with this simple code. Margin-bottom does not appear
Thanks!
CSS:
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container div{
position: relative;
}
.container{
width: 300px;
text-align: center;
margin:20px auto;
padding: 10px;
}
form:not(:last-child){
margin-bottom: 20px;
}
HTML:
<body>
<div class="container">
<h2>Please sign up</h2>
<form name='form'>
<div class='fname'><input type="text" name='fname' placeholder='First name'></div>
<div class='sname'><input type="text" name='sname' placeholder='Second name'> </div>
<div class='email' ><input type="email" name='email' placeholder='Email adress'> </div>
<div class='phone' ><input type="number" name='phone' placeholder='Phone number'> </div>
<div class='pass' ><input type="password" name='pass' placeholder='Password'> </div>
<button type="button"> Sign Up</button>
</form>
</div>
<script src="script.js"></script>
</body>