Background image in Cassiopeia (opacity-issue!)

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
w13ear33
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri May 12, 2023 6:58 pm

Background image in Cassiopeia (opacity-issue!)

Post by w13ear33 » Sat Sep 23, 2023 10:42 am

Hi,

I am working with the cassiopeia template and I like to achieve the following:
The whole website needs a background image with an opacity factor.

I have tried to place the background image in the body with an opacity factor but this makes all html elements inherit the same opacity.

When I add an opacity with value 1 and !important to underlying elements, this has no effect.
Both background image and text have the same opacity as the body.

Does anyone have any suggestions for this problem?

Kind regards,
Winfried

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30462
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Background image in Cassiopeia (opacity-issue!)

Post by Per Yngve Berg » Sat Sep 23, 2023 7:57 pm

Link to the site?

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1413
Joined: Tue Jun 30, 2020 12:17 pm

Re: Background image in Cassiopeia (opacity-issue!)

Post by Pavel-ww » Sun Sep 24, 2023 7:50 am

w13ear33 wrote:
Sat Sep 23, 2023 10:42 am
When I add an opacity with value 1 and !important to underlying elements, this has no effect.
Both background image and text have the same opacity as the body.
Hi. Provide a link to your site. And explain in more detail what you want to achieve using opacity. Decisions can be different depending on the goal.

Spoiler: The opacity css property is not applicable separately to the background image. This is applied to the entire element and to all its child elements. There are workarounds or other properties


Post Reply

Return to “Templates for Joomla! 4.x”