No "transparencies"

Hello guys! Good afternoon, let me tell you, in the middle of configuring and improving responsive web designs, I would like the text that is inside the “form” element not to become transparent but to remain in its original color (in this case, white) … and although I have been giving and giving for time, I have not been able to get it. Does anyone want to help me? https://codepen.io/pabloeoliveros/pen/dyMrpxq?editors=1100

I think I need more info.

I would like the text that is inside the “form” element not to become transparent but to remain in its original color (in this case, white)

To what text are you referring? I don’t see that happening.


from where it says “first and last name” to where the drinks are named, those texts I mean.

IC, you mean semi-transparent.

Right, you’re applying an opacity of 50% to all of the survey-form. That text is part of the survey-form. Instead of applying an opacity to that and all it’s children, what if you just did it to the background-color, like background-color: rgba(90, 54, 154, 0.5);? You also misspelled “width” on the next line.

Nothing happens:


what do you think that should i do? :confused:

The color of the text looks very different to me, it’s no longer semi transparent. Either I need to get my eyes checked or you need to explain what it is you’re trying to accomplish.

Pal.
I try to make the purple box “semi-transparent” without the transparent eating away at the letters of the form.

IC, you mean that the background is no longer semi-transparent. That’s not the same thing as “nothing happens” - something did happen.

What I was suggesting was changing the values for the survey-form class, not create a new one. I was suggesting this:

.survey-form{
  background-color: rgba(90, 54, 154, 0.5);
  width: 400px;
}
1 Like

background-color is not a valid css selector…

it’s a css rule, you need to put it inside the selector for the element you want to give that rule to

1 Like

Now it works! THX A LOOT!
(it seems that i should use rgb next time…)

It really depends on what you’re trying to do.

1 Like