Fix code

hi can anyone fix this code?

rgba (255, 255, 255, 0/%20%) !important;

I cannot get it to work right it should be a white colour with 20% opacity, it worked once but then I deleted it and forgot how it went it was very similar to the above code, can anyone fix it?

1 Like

Hi, The correct syntax for setting a white color with 20% opacity in CSS .

This will give you the desired white color with 20% opacity.

rgba (255, 255, 255, 0.2) !important;

Thanks

Hi @rajimulislamjoy for some reason this does not work

Hi @tranquilweaves

Check this one.

rgba(255, 255, 255, 0.2) !important;

rgba(255, 255, 255) - white

0.2 rounded 20% opacity.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like

@Made4uo-Ribe this does not work, the one I used similar to what I wrote worked yesterday but I have now lost it

Hi @tranquilweaves ,

In this notation, the RGBA values are used to define a color in CSS. The first three values (255, 255, 255) represent the intensity of the red, green, and blue channels respectively, ranging from 0 to 255. The fourth value (0.2) denotes the alpha channel, which controls transparency, varying from 0 (fully transparent) to 1 (fully opaque).

To clarify, ensure there is no percentage sign (%) after the alpha value, and remember to include a decimal point (.) before the opacity value (e.g., 0.2 for 20% opacity). This ensures proper rendering of the desired color with the specified transparency level.
The exact code is:
rgba(255, 255, 255, 0.2) !important;

1 Like

Hi @tranquilweaves , Pls try with this code:

border: .2rem solid rgba(255, 255, 255, .2) !important;
1 Like

You have more choices.

background: white;
opacity: .2;

or

background-color: hsla(0, 0%, 100%, 0.2);

or

background-color: #ffffff33;

If this wont work then there is some overide codes.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like