Currently in Elementor we have multiple ways to size our text. We can choose between px, em, and rem which is great when used properly.
Because Elementor only lets use adjust between desktop, mobile and tablet working with large text can be an issue due to the amount of devices that fall in between desktop and tablet view points.
With EM and REM sizing not working as they should you can’t take advantage of their responsive power. This is how em and rem sizing looks within Elementor.
But when em and rem are used properly you can achieve responsive and flexible Large Text based on view width ( vw ) in which case would solve most of the issues pertaining to Large Text across different device sizes.
Let’s Begin
In order for em and rem to work effectively the parent section needs to have a set font size. So we need to add a special class and some CSS to the main section containing your large text.
Add this class in the advanced part of the section:
[css]
flexible_text
[/css]
Add this css in the CSS portion of that section:
[css]
/* This css only works on screen larger than 800px */
@media (min-width: 800px){
.flexible_text{
font-size: 2vw;
}
}
[/css]
Now all that is needed is to change your text size to em and configure to your liking.
The Result
Normally for tablet and mobile this is not an issue so I would continue to use pixels ( px ). So be sure to toggle tablet and mobile view to adjust the size of your text in pixels.
3 Responses
Works like a charm! Thanks
👍👍👍👍
” Maybe one day we will get an option to choose our text size by vw ” I can find this option in elementor now. Along with px, em and rem, I see vw as well for font size. Have you tried it yet?