word-spacing

Jquery - Fit text into element with only letterspacing & word-spacing

允我心安 提交于 2021-01-29 22:27:26
问题 Is there a plugin for this? I have been screening of the internetz and found bigText, Justify, fitText, textFit but they all seem to work with the font-size which I dont want to do. I only want the text to fit inside a element with a defined width. HTML: <div id="title"> <h1>One header that i pretty long</h1> <h2>Sub-header that is shorter</h2> </div> CSS: #title { width: 300px; } h1 { font-size: 3em; } h2 { font-size: 2em; } The problem with the plugins that I've found so far is that the sub

Jquery - Fit text into element with only letterspacing & word-spacing

风格不统一 提交于 2021-01-29 22:16:53
问题 Is there a plugin for this? I have been screening of the internetz and found bigText, Justify, fitText, textFit but they all seem to work with the font-size which I dont want to do. I only want the text to fit inside a element with a defined width. HTML: <div id="title"> <h1>One header that i pretty long</h1> <h2>Sub-header that is shorter</h2> </div> CSS: #title { width: 300px; } h1 { font-size: 3em; } h2 { font-size: 2em; } The problem with the plugins that I've found so far is that the sub

CSS word-spacing issue in Safari 6.1/7.0 with text-align center

人走茶凉 提交于 2020-01-14 18:59:08
问题 When I align text center in Safari 6.1/7.0 and add word-spacing, it centers the text as if its width did not include the space in the center. E.g. CSS div { width:300px; border: 1px solid #CCC; } h1 { text-align:center; word-spacing: 90px; } E.g. HTML <div> <h1>Text Text</h1> </div> How it displays in all other browsers: http://i.imgur.com/JfdM2YG.png How it displays in Safari 7.0: http://i.imgur.com/OrhLa2Y.png A demo: jsfiddle.net/2rwa3/2/ Are there any workarounds for this without wrapping

CSS word-spacing issue in Safari 6.1/7.0 with text-align center

谁都会走 提交于 2020-01-14 18:58:52
问题 When I align text center in Safari 6.1/7.0 and add word-spacing, it centers the text as if its width did not include the space in the center. E.g. CSS div { width:300px; border: 1px solid #CCC; } h1 { text-align:center; word-spacing: 90px; } E.g. HTML <div> <h1>Text Text</h1> </div> How it displays in all other browsers: http://i.imgur.com/JfdM2YG.png How it displays in Safari 7.0: http://i.imgur.com/OrhLa2Y.png A demo: jsfiddle.net/2rwa3/2/ Are there any workarounds for this without wrapping

CSS word-spacing issue in Safari 6.1/7.0 with text-align center

懵懂的女人 提交于 2020-01-14 18:58:17
问题 When I align text center in Safari 6.1/7.0 and add word-spacing, it centers the text as if its width did not include the space in the center. E.g. CSS div { width:300px; border: 1px solid #CCC; } h1 { text-align:center; word-spacing: 90px; } E.g. HTML <div> <h1>Text Text</h1> </div> How it displays in all other browsers: http://i.imgur.com/JfdM2YG.png How it displays in Safari 7.0: http://i.imgur.com/OrhLa2Y.png A demo: jsfiddle.net/2rwa3/2/ Are there any workarounds for this without wrapping