Cannot add alpha background color to div section

I’m trying to add a black & slightly transparent background to the #main-outlet div on a theme and it does add the background, but not the transparency. My CSS so far:

#main-outlet {
    background-color: rgba(0,0,0,75%);
}

and here is the final result, where there is no transparency at all:

(The hex alpha is not supported by Discourse - #00000075 - and it gave me an error when trying to parse the CSS)

Is there a possible workaround for this?

Try this:

// Black with 75% opacity
#main-outlet {
    background-color: rgba(0, 0, 0, 0.75);
}

It’s looking for a decimal value rather than the percent.

4 Likes

Much better. Thanks for replying!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.