Remove Gaps Justified text with Hyphenation
Is there a way to remove the gaps on justified text using hyphens with jQuery?
Not repeating 开发者_运维知识库a bunch of hyphens.
I'm using the following plugin:
http://welcome.totheinter.net/columnizer-jquery-plugin/
If the font is monospaced, then you can predict the width of a line and justify the text as you like (by inserting "-" in spaces).
Your question is a little confusing, but... If you mean remove space between specific words, you just need to use a single dash between those words.
In CSS, text-align: justify
does not add any additional spaces, but modifies the word-spacing per line. If you want to not justify your text, then just use text-align: left
on any block element (
, , etc.).
If you mean adding hyphens to words to break them to the next line and make the word-spacing prettier use Sweet Justice which works with jQuery or YUI.
http://carlos.bueno.org/2010/04/sweet-justice.html
精彩评论