Click to See Complete Forum and Search --> : Can't hyphenate text?
jamesx521
12-15-2004, 10:25 AM
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.
jms
NogDog
12-15-2004, 10:49 AM
The 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.
jamesx521
12-15-2004, 11:01 AM
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 "services".
Would google, yahoo, etc. recognize that "services" means "services"? Thanks.
jms
jamesx521
12-15-2004, 11:15 AM
When 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.
jms
NogDog
12-15-2004, 11:19 AM
Originally 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 "services".
Would google, yahoo, etc. recognize that "services" 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.
Ben Rogers
12-15-2004, 04:44 PM
Do you have PHP available? If you do, wordwrap() (http://us3.php.net/wordwrap) might be of use...
jamesx521
12-15-2004, 08:39 PM
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
Ben Rogers
12-15-2004, 08:42 PM
Originally 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