Comment voulez-vous forcer des sauts de ligne entre les mots que dans css / html?

StackOverflow https://stackoverflow.com/questions/2259688

  •  20-09-2019
  •  | 
  •  

Question

J'ai juste un morceau régulier de texte dans une balise <p> dans une balise <div>. Mais que Firefox affiche correctement.

Firefox brise les lignes entre les mots. Tous les autres navigateurs briser la ligne mi-mot ce qui le rend difficile à lire.

Voici un exemple de ce que je veux dire:

Firefox (travail):

This was busy in it was I was here. Let 
him as being within eight by their 
graves, to go down upon her to be a 
dozen directly. So, leaving word 
following, poor mother, of other man, 
and my finger on his blue flag, and the 
habit of tea on a bit. I might feel 
very sorry there is rich, too; late of 
his deepest voice...

Tous les autres navigateurs (IE5-8, safari, chrome) (ne fonctionne pas:)

This was busy in it was I was here. Le
t him as being within eight by their g
raves, to go down upon her to be a doz
en directly. So, leaving word followin
g, poor mother, of other man, and my f
inger on his blue flag, and the habit 
of tea on a bit. I might feel very sor
ry there is rich, too; late of his dee
pest voice...

Comment puis-je faire ce travail pour tous les navigateurs?

Était-ce utile?

La solution

Quelque part dans votre css vous avez probablement word-wrap: break-word. Trouvez et changer pour word-wrap: normal (ou simplement supprimer l'élément mot-wrap au total).

Autres conseils

Pour le texte à briser son propre juste ajouter un rembourrage sur le côté gauche et à droite au conteneur (div, td etc.) du texte.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top