Return to Snippet

Revision: 55687
at February 17, 2012 08:12 by Kerrick


Initial Code
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;
}

Initial URL
http://kristinlbradley.wordpress.com/2011/09/15/cross-browser-css-justify-last-line-paragraph-text/

Initial Description
This simply justifies a single line of text via CSS.

Initial Title
Justify one line of text in CSS

Initial Tags
text, line

Initial Language
CSS