Search…

X3 Photo Gallery Support Forums

Search…
 
ed_f
Experienced
Topic Author
Posts: 166
Joined: 20 Dec 2020, 11:24

automatic hyphenation?

23 Oct 2026, 13:16

where and how can I add a command for automatic hyphenation throughout my entire website (hyphens: auto)?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14509
Joined: 30 Sep 2006, 03:37

Re: automatic hyphenation?

24 Oct 2026, 00:05

CSS Hyphens
https://developer.mozilla.org/en-US/doc ... es/hyphens

But did you include ­ (soft hyphen) in all your texts across your entire website? That is the only way the hyphen option will have any effect all all. If you have a link, I can check for reference.
 
ed_f
Experienced
Topic Author
Posts: 166
Joined: 20 Dec 2020, 11:24

Re: automatic hyphenation?

24 Oct 2026, 04:39

I needed at one point (in one of these very long german words) to include that, about which I learned asking google. and it told me, that if I include such auto-function it could do so across my whole site according to the rules. so that was just another hallucination?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14509
Joined: 30 Sep 2006, 03:37

Re: automatic hyphenation?

25 Oct 2026, 01:33

ed_f wrote:I needed at one point (in one of these very long german words) to include that,
So just so I understand, you have a very long German word like "Donaudampfschifffahrtsgesellschaftskapitän", and instead of having that word entirely go onto a new line, you want it to automatically split on two lines separated by hypen - ?
ed_f wrote:and it told me, that if I include such auto-function it could do so across my whole site according to the rules. so that was just another hallucination?
Depends on what you asked. If you can show me exactly what you asked and what the AI answered, maybe I can provide some follow up information.

You can't have HTML automatically break single words into multiple lines, because how is it supposed to know where to break the word? The only way to achieve that, would be to include the hyphen directly in the word, eg "Donaudampfschiff-fahrtsgesellschaftskapitän", or include soft hyphens "­" (as explained in this link).

There is an option word-break: break-all;, but this is not automatic hyphenation. It just breaks the word in two when there is no more space, even if it's wrong. For example, the word "hippopotamus" could come out like this:

hippopotam
us
 
ed_f
Experienced
Topic Author
Posts: 166
Joined: 20 Dec 2020, 11:24

Re: automatic hyphenation?

25 Oct 2026, 04:07

it was something like this, but it would probably have to be included in every page and not work once for the whole site. and yes, it would probably look worse after than before. bad idea. the single word hyphenation I already used for that word which put me on that track. but even the word Donaudampfschifffahrtsgesellschaftskapitänskajütenordonnanzoffiziersbefehlsverweigerung looks much better without hyphenation.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14509
Joined: 30 Sep 2006, 03:37

Re: automatic hyphenation?

25 Oct 2026, 11:02

I checked again, and you are right. You can just add the "hyphens: auto;", and it should automatically add hyphens to words, according to the language assigned in your browser.

You would go to Settings > Custom > Custom CSS, and just set the following. No need to set it on a per-page basis.
Code
body {
  hyphens: auto;
}
Using the "­" is optional, if you want to control how words split manually.
ed_f wrote:it would probably look worse after than before. bad idea. the single word hyphenation I already used for that word which put me on that track. but even the word Donaudampfschifffahrtsgesellschaftskapitänskajütenordonnanzoffiziersbefehlsverweigerung looks much better without hyphenation.
It guess it depends on the situation ...
 
ed_f
Experienced
Topic Author
Posts: 166
Joined: 20 Dec 2020, 11:24

Re: automatic hyphenation?

25 Oct 2026, 11:15

that would be worth a try - would it set back when just deleting that again?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14509
Joined: 30 Sep 2006, 03:37

Re: automatic hyphenation?

Yesterday, 00:17

ed_f wrote: that would be worth a try - would it set back when just deleting that again?
Yes
 
ed_f
Experienced
Topic Author
Posts: 166
Joined: 20 Dec 2020, 11:24

Re: automatic hyphenation?

Yesterday, 07:59

after some hours and on 2 browsers on 3 devices no change occurs. I just realise btw, how edge produces less sharp texts, which I didn't before (nothing to do with the change of course).
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14509
Joined: 30 Sep 2006, 03:37

Re: automatic hyphenation?

Today, 00:17

ed_f wrote: after some hours and on 2 browsers on 3 devices no change occurs.
Do you have a link so I can check?
ed_f wrote:I just realise btw, how edge produces less sharp texts, which I didn't before (nothing to do with the change of course).
Windows desktop? Yes, different operating systems and even browsers, render fonts differently, which is extremely annoying for web designers when assigning font styles.
 
metallissimus
Experienced
Posts: 366
Joined: 17 Oct 2019, 06:54

Re: automatic hyphenation?

Today, 05:07

mjau-mjau wrote:according to the language assigned in your browser.
IIRC it's the language assigned to the page via HTML lang attribute. And I remember my SEO tool telling me there is no language set on my site. Because it didn't seem important to me, I never looked into how I could do that in X3 though. But in my experience hyphens: auto didn't work, probably because of that. I soft-hyphenated all my relevant texts manually. 
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
ed_f
Experienced
Topic Author
Posts: 166
Joined: 20 Dec 2020, 11:24

Re: automatic hyphenation?

3 minutes ago

that should be the reason. but do not worry - the soft hyphen will do in extreme cases.