float: right in IE7 dropping to a new line

前端 未结 5 2059
甜味超标
甜味超标 2020-12-14 08:01

I\'ve been stuck on a float issue for a little while so I am hoping the community can help me again. I have a new webform here. As usual it looks fine in everything but IE7

5条回答
  •  鱼传尺愫
    2020-12-14 08:41

    If you float your .formText left, float your span.required left, and then float your inputs left as well you should be able to line them up on the same line.

    I'd modify your markup a bit. your should really be a

    For example:

    and your css would be something like this:

    .formRow {
      clear: both;
    }
      .formRow label {
         float: left;
         width: 150px;
      }
      .formRow input {
         float: left;
      }
    

提交回复
热议问题