Wikiwi Posted October 17, 2022 Report Share Posted October 17, 2022 This custom solution will allow you to change the content of an HTML element depending on your device.You just need to create an HTML BLOCK or use a HEADER and FOOTER and disable the HTML editor. Take note that this is not the actual use of a Psuedo-Element ("::before"). This is just an experiment that I tried on my App.Put the following script: <style> p#test::before { content: "This message is for the Desktop viewer"; /*You can change this part to show your own message for Desktop view*/ } @media (max-width: 640px) { p#test::before { content: "This message is for the Mobile viewer"; /*You can change this part to show your own message for Mobile view*/ } } } </style> <p id="test"></p> /*This will be the container of your messages*/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.