https://codepen.io/Rookie_Dev99/pen/YzGOayQ

[Dealing with Opacity ] — line 22 in HTML && 53 in CSS(on the Codepen link)

Hello, I want to use opacity only to the BACKGROUND of the ‘p’ that has ‘.caption’ class

But the letters inside of the paragraph becomes transparent too when I used it.

HOW CAN I MAKE LETTERS in ‘p’ NOT TO BE TRANSPARENT?

codepen link

(Hope you guys can understand my poor English…)

you could use rgba background color, example here:

background-color - CSS: Cascading Style Sheets | MDN

the a stand for alpha, setting the transparency.

as you can read here:

opacity - CSS: Cascading Style Sheets | MDN

opacity isn’t going to work if you only want the back-ground.

1 Like

Thank you so much for your quick response && help !!! You’re my SAVIOR!!! THANK YOU SO MUCH AGAIN!!! :star_struck:

Your help made my day and motivated me to study harder!!!