syllabification in headlines
-
Good morning dear forum
Is it possible to set automatic syllabification for texts and especially for headlines?
Best regards
Dennis
-
Syllabification means your word breaking at certain points in the word.
If you want it to be done automatically, you can try this.
https://developer.mozilla.org/en-US/docs/Web/CSS/hyphensIt seems that there is a CSS property that can do this.
If your headlines are for example h1, h2, h3, h4, and so on:
h1,h2,h3,h4,h5{ hyphens: auto; }
Enter this css in "lay options" -> "custom css & html" -> "custom css"
In the link above, it also says a language attribute is needed so the browser knows which syllabification rules to apply.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/langI think by default Lay Theme websites have a language attribute on the HTML tag that says en-us:
If you use a language other than English, you probably need to change this for the syllabification to work properly.
If you go to settings > general and set the site language, I think this will set the lang property correctly:
For manual syllabification you can use this special button that is available in the text editor.
When you edit your headline in the text element, put your cursor to where you want the headline to break, then click this button (soft hyphen) :
Now the headline will break at that point. Please note the soft hyphen character is an invisible character.
So, once you insert it, it's hard to see where you put it, and if you want to insert it at a different point, you may need to delete the whole headline and write it again, inserting the soft hyphen again.Another thing you could try is to set up the headline in a way where it likely doesn't break at all.
When you create a new text format in Text Formats, you can choose a font size that is a percentage-based font size.
Using a percentage-based font size, the headline would scale with the browser, so it won't need to break.
-
Hey thank you very much! That are many options I didn`t know about. Great support!
I also code custom websites or custom Lay features.
šæ Email me here: šæ
info@laytheme.com
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options ā Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it