Site logo

Archived topic

How to add text shadow

5 replies · Started by Ben on December 18, 2020

Viewing posts 1–6 of 6

Hey guys,

How would I add a text shadow?

Thanks

Hi Ben,

We can use some CSS to style that content.
First add a custom class to the text, eg. text-shadow then add this css:

.text-shadow {
    text-shadow: 1px 2px 5px rgba(0,0,0,0.8);
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

If you need further assistance, please link us your site using the private info field. :)

That's worked on desktop but it doesn't work on mobile?

Any ideas?

Thanks

Hi,

That’s worked on desktop but it doesn’t work on mobile?

That's due to the CSS being placed within a @media (min-width:769px) { ... } rule.

Place the code provided outside of the media rule so it applies to all viewports.

Ahh OK, thanks

No problem :)

This archived topic is closed to new replies.