code_junkie

What is the best way to indent text in a DIV when it wraps

Nov 13th, 2011
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. div {
  2. padding-left: 2em;
  3. text-indent: -2em;
  4. }
  5.  
  6. div {
  7. padding-left: 2em;
  8. text-indent: -2em;
  9. }
  10.  
  11. div {
  12. padding-left: 2em;
  13. text-indent: -2em;
  14. }
  15.  
  16. .indentedtext
  17. {
  18. text-align:start;
  19. text-indent:5em;
  20. }
  21.  
  22. p {padding:10px;}
  23. p:first-line {padding-left:0px;}
  24.  
  25. <p>Hello World, I'm Jonathan Sampson</p>
  26.  
  27. <div style="width: 150px; text-indent: -2em; padding-left: 2em;">
  28. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
  29. incididunt.
  30. </div>
  31.  
  32. <div>
  33. Lorem ipsum dolor sit amet,
  34. <div margin-left="5px"> consectetur adipisicing
  35. elit, sed do eiusmod
  36. tempor incididunt
  37. </div>
  38. </div>
Add Comment
Please, Sign In to add comment