Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 1.01 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Why won't first div in this html display as a column next to the rest of the html that is float:right
  2. <div style="padding-top:20px; float:left; width:50%; clear:both">Column 1</div>
  3. <div class="" style="padding-bottom: 10px; padding-right:20px; width: 50%; float:right; clear:both;">
  4.   <label for="title">
  5.     <h3 style="text-align:left">Column 2</h3>
  6.   </label>
  7. </div>
  8. <div class="" style="padding-bottom: 10px; padding-right:20px; width: 50%; float:right; clear:both;">
  9.   <input type="text" maxlength="255" value="">
  10. </div>
  11. <div class="" style="padding-bottom: 10px; padding-right:20px; width: 50%; float:right; clear:both;">
  12.   <label for="body">
  13.     <h3 style="text-align:left">Column 2</h3>
  14.   </label>
  15. </div>
  16. <div class="" style="padding-bottom: 10px; padding-right:20px; width:50%; float:right; clear:both;">
  17.   <textarea maxlength="60000"></textarea>
  18. </div>
  19.        
  20. .box {
  21.     width: 50px;
  22.     padding: 50px;
  23. }
  24.        
  25. #col1{
  26.   float:left;
  27.   width:50%;
  28. {
  29.  
  30. #col2{
  31.  float:left;
  32.  width:50%
  33. }
  34.        
  35. <div id="col1"></div>
  36. <div id="col2"></div>