Can't hyphenate text?

admin

Administrator
Staff member
I'm trying to hyphenate text in the same way Quark, Photoshop and Word do it automatically. My text is a simple paragraph made of many sentences, placed in a table that is placed in a Div layer.

I tried with
word-break-inside: hyphenate;
and several different options from W3C.org but couldn't achieve that simple effect.
This code breaks the words, but does not show hyphens and it breaks the word anywhere, not in the grammatically correct way.
word-break: break-all

Thanks.

jmsThe only way I know to do this (which does not mean it is the only way) is to embed ­ (soft hyphen) characters at valid hyphenation points.Yes,
that did work, however if I'm breaking the word with ­ would that cause a problem with search engines searching for that word? Let's say for the word "services" I have "ser­vi­ces".
Would google, yahoo, etc. recognize that "ser­vi­ces" means "services"? Thanks.

jmsWhen I looked at my posting the character you wrote ­, the one that is made of the & + shy + ; would not display, maybe because it's invisible. But you'll probably understand the message anyway. I was concerned if the search engines would be confused about pasting that character within a word.

jmsOriginally posted by jamesx521
Yes,
that did work, however if I'm breaking the word with ­ would that cause a problem with search engines searching for that word? Let's say for the word "services" I have "ser­vi­ces".
Would google, yahoo, etc. recognize that "ser­vi­ces" means "services"? Thanks.

jms
One would hope that they are smart enough to deal with it, but of course assuming so could be dangerous. :rolleyes: Under the premise that the most important words for search engines are generally those in your H1 and H2 tags, I would think it might be a good idea to not hyphenate them; then go ahead and soft-hyphenate long words in P, LI, etc. elements.Do you have PHP available? If you do, wordwrap() (<!-- m --><a class="postlink" href="http://us3.php.net/wordwrap">http://us3.php.net/wordwrap</a><!-- m -->) might be of use...I'm on a intro level PHP. If there is a simple code to do it with php then I'd do it. But doesn't it mean that I'll have to save the whole page as php?

jmsOriginally posted by jamesx521
I'm on a intro level PHP. If there is a simple code to do it with php then I'd do it. But doesn't it mean that I'll have to save the whole page as php?

jms If you're not using a CMS, then no, you can't modify the contents with PHP without using PHP. :p
 
Back
Top