Search code examples
csshtmlblockquote

Opacity associated with text within a blockquote


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;
}

Solution

  • 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);
    }