Tengo 2 bloques de texto que son bastante pequeños (menos de un párrafo cada uno) y realmente se ven mejor justificados, pero el problema es que text-align: justify;
a veces agrega espacios muy grandes y hace que el texto sea un poco feo (el efecto contrario, obviamente).
¿Es posible ajustar más finamente el espacio entre palabras con CSS para que esto no suceda?
Esta propiedad solo para IE ofrece un refinamiento en el valor de "justificación" utilizado en la text-align
propiedad. De hecho, el valor de "justificación" debe establecerse para que esa propiedad text-justify
tenga algún efecto.
text-justify
ofrece un buen nivel de control de justificación sobre el contenido adjunto, lo que permite una variedad de modelos de justificación sofisticados utilizados en diferentes sistemas de escritura de idiomas.
Ejemplo
<p style="text-align: justify; text-justify: newspaper;">
This is “Newspaper” justified content
</p>
VALUE DESCRIPTION
---------------------- ---------------------------------------------------------------------
auto The browser will determine the appropriate justification algorithm
to use
distribute Justification is handled similarly to the “newspaper” value,
but this version is optimized for East Asian content
(especially the Thai language.)
In this justification method, the last line is not justified.
distribute-all-lines Behavior and intent for this value is the same as with the
“distribute” value, but the last line is also justified.
inter-cluster Justifies content that does not have any inter-word spacing
(such as with many East Asian languages.)
inter-ideograph Used for justifying blocks of ideographic content.
Justification is achieved by increasing or decreasing spacing
between ideographic characters and words as well.
inter-word Justification is achieved by increasing the spacing between words.
It is the quickest method of justification and does not justify
the last line of a content block.
newspaper Spacing between letters and words are increased or decreased
as necessary.
La referencia de IE dice que "es la forma más sofisticada de justificación de los alfabetos latinos".
Fuente: http://www.css3.com/css-text-justify/
¡Espero que esto ayude!
Además de usar text-justify
, que parece ser compatible actualmente solo con IE, considere agregar guiones, con sugerencias de guiones explícitos ­
y/o guiones automáticos basados en el navegador, usando hyphens: auto
los prefijos de navegador debidos o usando guiones basados en JavaScript como Hyphenator.js. La separación de guiones a menudo reduce en gran medida la necesidad de espacio adicional en la justificación.
The text-justify property is supported in all of the major browsers.
, fuente: w3schools.com/cssref/css3_pr_text-justify.asp y Text-Align, w3schools.com/cssref/pr_text_text-align.asptext-justify
nada. Pero lamento haber escrito inicialmente sobre text-align-justify
en lugar de text-justify
(corregido ahora). Por supuesto, el escenario text-align: justify
está implícito aquí; la cuestión es si se puede controlar el tipo de justificación.
mndrix