Adjust the background-color Property of Text

Adjust the background-color Property of Text
0.0 0

#1

Tell us what’s happening:

I don’t know what is going wrong with my code
Please help me

Your code so far


<style>
  h4 {
    text-align: center;
    background-color : rgba(45, 45, 45, 0.1);
    padding : 10px;
  }
  p {
    text-align: justify;
  }
  .links {
    text-align: left;
    color: black;
  }
  .fullCard {
    width: 245px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 10px 5px;
    padding: 4px;
  }
  .cardContent {
    padding: 10px;
  }
  .cardText {
    margin-bottom: 30px;
  }
</style>
<div class="fullCard">
  <div class="cardContent">
    <div class="cardText">
      <h4>Alphabet</h4>
      <hr>
      <em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>
    </div>
    <div class="cardLinks">
      <a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a><br><br>
      <a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
    </div>
  </div>
</div>

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/adjust-the-background-color-property-of-text/


#2

Hi,

The challenges are quite picky in terms of spacing, but it is good practice to do this in any case. You have spaces before the semi colons in the lines you have added. You need to remove them for both of the lines you entered in order to pass the challenge.

For example:

padding : 10px; //will not pass
padding: 10px; //will pass

Hope this helps :slight_smile:


#3

here you have to remove the space between" background-color: rgba(45, 45, 45, 0.1)" like this
hopeit will work