code_junkie

Why does a floated <input> control in a floated element slide over too far to the right in IE7, but not in Firefox?

Nov 11th, 2011
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. <fieldset id="RequestInformation">
  2. <legend>Request Information</legend>
  3. <ol>
  4. <li>
  5. <label id="ctl00_ContentPlaceHolder1_txtRequestDate_L" class="stdLabel"
  6. for="ctl00_ContentPlaceHolder1_txtRequestDate">Request Date:</label>
  7. <div class="FormGroup">
  8. <input id="ctl00_ContentPlaceHolder1_txtRequestDate" class="RSV DateTextBox hasDatepicker"
  9. type="text" value="10/05/2004" name="ctl00$ContentPlaceHolder1$txtRequestDate"/>
  10. <img class="ui-datepicker-trigger" src="/PROJECT/images/Calendar_scheduleHS.png" alt="..." title="..."/>
  11. <span id="txtRequestDate_error"/>
  12. </div>
  13. </li>
  14. --STUFF DELETED HERE--
  15. <li>
  16. <label id="ctl00_ContentPlaceHolder1_chkAppealed_L" class="stdLabel"
  17. for="ctl00_ContentPlaceHolder1_chkAppealed"> Request Appealed?</label>
  18. <div class="FormGroup">
  19. <span class="stdCheckBox">
  20. <input id="ctl00_ContentPlaceHolder1_chkAppealed" type="checkbox" name="ctl00$ContentPlaceHolder1$chkAppealed"/>
  21. </span>
  22. </div>
  23. </li>
  24. </ol>
  25. </fieldset>
  26.  
  27. div
  28. {
  29. border-style: solid;
  30. border-width: thin;
  31. border-color:Orange;
  32. }
  33.  
  34. label
  35. {
  36. border-style: solid;
  37. border-width: thin;
  38. border-color:Blue;
  39. }
  40.  
  41. .FormGroup
  42. {
  43. float:left;
  44. margin-left: 1em;
  45. clear: right;
  46. width: 75em;
  47. }
  48.  
  49. .FormGroup > *
  50. {
  51. float:left;
  52. background-color: Yellow;
  53. }
  54.  
  55. fieldset ol
  56. {
  57. list-style: none;
  58. }
  59.  
  60. fieldset li
  61. {
  62. padding-bottom: 0.5em;
  63. }
  64.  
  65. li > label:first-child
  66. {
  67. display: block;
  68. float: left;
  69. width: 10em;
  70. clear: left;
  71. margin-bottom: 0.5em;
  72. }
  73.  
  74. em
  75. {
  76. color: Red;
  77. font-weight: bold;
  78. }
  79.  
  80. //IE Margin fix:
  81. // http://www.positioniseverything.net/explorer/inherited_margin.html
  82. jQuery.each(jQuery.browser, function(i) {
  83. if($.browser.msie){
  84. $(":input").wrap("<span></span>");
  85. }
  86. });
Add Comment
Please, Sign In to add comment