Apologies, I am new to CSS. Here is the HTML code I have:
<div class="box-A" >Box A content goes here</div>
<div class="box-B" >Box B content goes here</div>
I attempted to apply the following CSS to it:
.box-A{
background-color: red;
padding: 30px;
margin: auto;
border: 13px solid green;
margin-bottom: 40px;
}
.box-B{
background-color: blue;
padding: 40px;
margin-top: 140 px;
}
It seems to be working fine for box-A
, but when I add margin-top: 140 px;
to box-B
, I expect to see a total margin of around 180px
between the two boxes.
However, nothing seems to change. Can you please enlighten me on why margin-top
is not taking effect?