Posted By

noah on 06/13/07


Tagged

text layout wrap typography


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vali29
stoker


Indent text after line wrap


 / Published in: CSS
 

When a line of text is longer than the width of its container, it will break onto the next line. This style causes all lines but the first to be

  1. <style type="text/css">
  2. ul {
  3. width: 20em;
  4. }
  5. li {
  6. padding-left: 2em;
  7. text-indent: -2em;
  8. }
  9. </style>
  10. <
  11. <ul>
  12. <li>If we shadows have offended, think but this, and all is mended. That you have but slumbered here, while these visions did appear, and this weak and idle theme, no more yielding but a dream. Gentles, do not reprehend. If you pardon, we will mend. Else the Puck a liar call. And so good night unto you all. Give me your hands, if we be friends, and Robin shall restore amends</li>
  13. </ul>

Report this snippet  

You need to login to post a comment.