-1

I've been working on this for hours and have 0 idea what to do.

Although I think I have it right, it's saying that it is wrong. I have no idea what else to do.

The question says: The page contains a review within a block quote. Go to the Blockquote Styles section and create a style rule for the blockquote element that sets the background color to rgb(173, 189, 227) and the text color to the rgb(255, 255, 255) with an opacity of 0.65.

Here is my CSS code:

blockquote {
      background-color: rgb(173, 189, 227);
      color: rgb(255, 255, 255);
      opacity: 0.65;
}
timbuck250
  • 17
  • 3
  • You have it right. What error are you getting? You need to provide more context. – Adam Sep 09 '18 at 21:29
  • let me guess, a homework? in this case, try the padding for block instead .. And who is the *it* that is saying? – Temani Afif Sep 09 '18 at 21:33
  • Your style rules are 100% correct. This is most likely Cengage's poor validation not being able to determine that you have the right answer. E-learning sites are known to always have problems like this. – Adam Sep 09 '18 at 21:46
  • Maybe try `padding: 2.5px 10px`? Everything seems right, maybe it just expect another way to do it. – GMachado Sep 09 '18 at 21:49
  • Does it by any chance need a short-hand padding rule with all four values? Try `padding: 2.5px 10px 2.5px 10px`. – Adam Sep 09 '18 at 21:57
  • Ok, one last guess, maybe opacity refers to the opacity of the text, try using `color: rgba(255, 255, 255, 0.65)` – GMachado Sep 09 '18 at 21:58
  • @GMachado yes! That is correct! Thank you. However, so the way I had it above was targeting the entire box opacity instead of just the text? – timbuck250 Sep 09 '18 at 22:02
  • @Adam, GMachado solved it. I thought padding was the issue the entire time. It apparently wasn't. Thanks for your help and time. – timbuck250 Sep 09 '18 at 22:03
  • @GMachado Make an answer out of that so the question can be resolved. – Adam Sep 09 '18 at 22:05
  • Great @timbuck250! The interpretation was harder than the code haha. Yes, the way you were doing was setting the opacity of blockquote elements – GMachado Sep 09 '18 at 22:05
  • @Adam made the answer – GMachado Sep 09 '18 at 22:11

1 Answers1

1

The problem with your solution is how you're interpreting this part: "... and the text color to the rgb(255, 255, 255) with an opacity of 0.65.". It's asking to set the opacity of the text to 0.65, not of the entire element.

Using rgba should get it right:

blockquote {
    background-color: rgb(173, 189, 227);
    color: rgba(255, 255, 255, 0.65);
}
GMachado
  • 791
  • 10
  • 24