Guest User

Untitled

a guest
Jan 19th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. <div id="one">
  2. </div>
  3. <div id="two">
  4. </div>
  5. <div id="three" class="clearfix">
  6. </div>
  7.  
  8. #one {
  9. float:left;
  10. }
  11.  
  12. #two {
  13. float:right;
  14. }
  15.  
  16. .clearfix {
  17. clear:both;
  18. }
  19.  
  20. #three {
  21. margin-top: 20px;
  22. }
  23.  
  24. <div id="container">
  25. <div id="one"></div>
  26. <div id="two"></div>
  27. </div>
  28. <div id="three"></div>
  29.  
  30. #container {
  31. overflow:hidden;
  32. }
  33. #one {
  34. float:left;
  35. }
  36. #two {
  37. float:right;
  38. }
  39. #three {
  40. margin-top: 20px;
  41. }​
  42.  
  43. padding-top : 20px
  44.  
  45. position: relative;
  46. top: 20px;
  47.  
  48. padding-bottom: 20px;
  49.  
  50. #two:after {
  51. content : "";
  52. clear : both;
  53. display : block;
  54. height : 20px; // or margin-bottom: 20px;
  55. }
  56.  
  57. <div style='overflow:hidden'>
  58. <div id="one">Left</div>
  59. <div id="two">Right</div>
  60. </div>
  61. <div id="three" class="clearfix">// your data </div>
  62.  
  63. <div class="row">
  64. <div id="one">
  65. a
  66. </div>
  67. <div id="two">
  68. b
  69. </div>
  70. </div>
  71.  
  72. <div id="three">
  73. c
  74. </div>
  75.  
  76. #one {
  77. float:left;
  78. }
  79. #two {
  80. float:right;
  81. }
  82. clearfix {
  83. clear:both;
  84. }
  85. .row{ overflow: hidden; border: 1px solid red; }
  86. #three {
  87. margin-top: 40px; border: 1px solid green;
  88. }
Add Comment
Please, Sign In to add comment