HTML command for transparent text? Topic is solved

Relax and enjoy The Lounge. For all Non-Joomla! topics or ones that don't fit anywhere else. Normal forum rules apply.
Locked
the apprentice
Joomla! Guru
Joomla! Guru
Posts: 801
Joined: Wed Nov 18, 2009 3:53 pm

HTML command for transparent text?

Post by the apprentice » Sun Jan 17, 2021 8:48 pm

To your knowledge is there a way to make a text some 50% transparent? I've tried with the command opacity but it doesn't seem to work.

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9606
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: HTML command for transparent text?

Post by AMurray » Sun Jan 17, 2021 9:47 pm

It should work, like this for in-line styles:

Code: Select all

<p style="opacity:0.5">transparent 50% text</p>
or like this for external style sheet:

Code: Select all

class_name {
  background-color: white;
  opacity: 0.15;
}
</style>
and so forth. (replace "class_name" with your CSS class).

Note the above are decimal values, it should work with percentage too like 50%, 15% etc.

Reference: https://www.w3schools.com/CSSref/css3_pr_opacity.asp
Regards - A Murray
General Support Moderator

the apprentice
Joomla! Guru
Joomla! Guru
Posts: 801
Joined: Wed Nov 18, 2009 3:53 pm

Re: HTML command for transparent text?

Post by the apprentice » Wed Jan 20, 2021 1:44 pm

I retried simply adding opacity 0.5 and it worked. Thanks anyhow for the extended advice!


Locked

Return to “The Lounge”