Adjusting the Padding of an Element?

Adjusting the Padding of an Element?
0

#1

Tell us what’s happening:

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: red;
    padding: 20px;
  }

  .green-box {
    background-color: green;
    padding: 10px;
  }
</style>
<h5 class="injected-text">margin</h5>

<div class="box yellow-box">
  <h5 class="box red-box">padding</h5>
  <h5 class="box green-box">padding</h5>
</div>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Linux; Android 6.0.1; Redmi Note 3 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36.

Link to the challenge:


#2

You did not include an answer to “Tell us what’s happening”. What have you tried? What isn’t working as expected? What tests are failing? What don’t you understand? What do you understand?


#3

I am not able to Change the padding of green box to match that of red box. Condition is " green-box class should give elements 20px of padding"


#4
 .green-box {
    background-color: green;
    padding: 10px;
  }

You’re giving it 10px, not 20.


#5

If I 20px also I am not getting


#6

Show us the solution you think should work.


#7

Sorry… it’s working now…thanks for the help.