Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css Hyphens not working in chrome [duplicate]

In my project paragraph (in p tag) i have give text-align:justify; but in some words there more space comes so for this solution i try: HTML code:

<p>What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>

CSS code:

p{
    text-align:justify;
    word-break: break-all;
    hyphens: auto;
}

but in this code mozilla works but not work in chrome,for this i try

p{
    text-align:justify;
    -ms-word-break: break-all; 
    word-break: break-all; 
    word-break: break-word; 
   -webkit-hyphens: auto; 
   -moz-hyphens: auto; 
   hyphens: auto;
}

below css there -webkit- is used for chrome right but still not working please help, please give the solutions......

like image 546
design metR Avatar asked Dec 08 '17 13:12

design metR


People also ask

How do you add a hyphen in CSS?

U+00AD (SHY) An invisible, "soft" hyphen. This character is not rendered visibly; instead, it marks a place where the browser should break the word if hyphenation is necessary. In HTML, use &shy; to insert a soft hyphen.

How do you keep a hyphenated word together in HTML?

Keep words on the same line To keep two words or a hyphenated word together on one line, you can use a nonbreaking space or nonbreaking hyphen instead of a regular space or hyphen. Click where you want to insert the nonbreaking space.

How do you add a hyphen in HTML?

U+00AD (SHY): an invisible, “soft” hyphen. This character is not rendered visibly; instead, it suggests a place where the browser might choose to break the word if necessary. In HTML, you can use &shy to insert a soft hyphen.

What is& shy in HTML?

In computing and typesetting, a soft hyphen (ISO 8859: 0xAD, Unicode U+00AD SOFT HYPHEN, HTML: &#xAD; or &#173; or &shy;) or syllable hyphen (EBCDIC: 0xCA), abbreviated SHY, is a code point reserved in some coded character sets for the purpose of breaking words across lines by inserting visible hyphens.


1 Answers

This is a known bug in Chrome for Windows, Linux, and ChromeOS.

like image 131
Quentin Avatar answered Nov 14 '22 22:11

Quentin