Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. <li><span></span> The lazy dog.</li>
  2. <li><span>AND</span> The lazy cat.</li>
  3. <li><span>OR</span> The active goldfish.</li>
  4.  
  5. The lazy dog.
  6. AND The lazy cat.
  7. OR The active goldfish.
  8.  
  9. <style type="text/css">
  10. ul
  11. {
  12. list-style-type: none;
  13. padding-left: 0px;
  14. }
  15.  
  16. ul li span {
  17. float: left;
  18. width: 40px;
  19. }
  20. </style>
  21.  
  22. <style type="text/css">
  23.  
  24. span {
  25. display: inline-block;
  26. width: 50px;
  27. }
  28.  
  29. </style>
  30.  
  31. <style type="text/css">
  32. div.f1 { float: left; width: 20px; }
  33. div.f2 { float: left; }
  34. div.f3 { clear: both; }
  35. </style>
  36.  
  37. <div class="f1"></div><div class="f2">The Lazy dog</div><div class="f3"></div>
  38. <div class="f1">AND</div><div class="f2">The Lazy cat</div><div class="f3"></div>
  39. <div class="f1">OR</div><div class="f2">The active goldfish</div><div class="f3"></div>
  40.  
  41. <html><head>
  42. <style type="text/css">
  43. span.f1 { display: block; float: left; clear: left; width: 60px; }
  44. li { list-style-type: none; }
  45. </style>
  46.  
  47. </head><body>
  48. <ul>
  49. <li><span class="f1">&nbsp;</span>The lazy dog.</li>
  50. <li><span class="f1">AND</span> The lazy cat.</li>
  51. <li><span class="f1">OR</span> The active goldfish.</li>
  52. </ul>
  53. </body>
  54. </html>
  55.  
  56. <style type="text/css"> span { width: 50px; display: block; } </style>
  57.  
  58. <li><span>&nbsp;</span>something</li>
  59. <li>span>AND</span>something else</li>
  60.  
  61. <li><span></span><strong>The</strong> lazy dog.</li>
  62. <li><span>AND</span> <strong>The</strong> lazy cat.</li>
  63. <li><span>OR</span> <strong>The</strong> active goldfish.</li>
  64.  
  65. li {position:relative;padding-left:80px;} // 80px or something else
  66. li span {position:absolute;top:0;left:0;}
  67. li strong {color:red;} // red or else
  68.  
  69. <style type="text/css">
  70.  
  71. span {
  72. position:absolute;
  73. width: 50px;
  74. }
  75.  
  76. </style>
  77.  
  78. <style>
  79. ul{
  80. text-indent: 40px;
  81. }
  82.  
  83. li{
  84. list-style-type: none;
  85. padding: 0;
  86. }
  87.  
  88. span{
  89. color: #ff0000;
  90. position: relative;
  91. left: -40px;
  92. }
  93. </style>
  94.  
  95.  
  96. <ul>
  97. <span></span><li>The lazy dog.</li>
  98. <span>AND</span><li>The lazy cat.</li>
  99. <span>OR</span><li>The active goldfish.</li>
  100. </ul>
  101.  
  102. <li><pre> The lazy dog.</pre></li>
  103. <li><pre>AND The lazy cat.</pre></li>
  104. <li><pre>OR The active goldfish.</pre></li>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement