/ Published in: CSS

This simply justifies a single line of text via CSS.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
h2 { height: 40px; /* Specifying the height and line-height prevents */ line-height: 40px; /* extra space from being added to the bottom. */ text-align: justify; text-align-last: justify; /* Internet Explorer 6+ */ } h2:after { /* All other browsers */ content: "."; display: inline-block; width: 100%; height: 0; visibility: hidden; }
URL: http://kristinlbradley.wordpress.com/2011/09/15/cross-browser-css-justify-last-line-paragraph-text/
Comments
