Tell us what’s happening:
This code is written by me and i checked every single type of problem. But, this is not working. The challenge is to create bottom margine of 20px in class blue-box CSS. I created it correctly but the result is saying that i am not putting margin to 20px of bottom.
Your code so far
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 10px;
}
.red-box {
background-color: crimson;
color: #fff;
margin-top: 40px;
margin-right: 20px;
margin-left: 40px;
margin-bottom: 20px;
}
.blue-box {
background-color: blue;
margin-top:40px;
margin-right:20px;
margin-left: 40px;
margin_bottom:20px;
color: #fff;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 8.1.0; vivo 1801) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Mobile Safari/537.36.
Challenge: Add Different Margins to Each Side of an Element
Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/basic-css/add-different-margins-to-each-side-of-an-element