左右对齐浮动:在FF/IE中工作但在Chrome中不起作用?

Pet*_*erV 1 css google-chrome css-float

我正在使用它

.align-left {
   float: left;
   width: 49%;
   }
.align-right {
   float: right;
   width: 49%;
   text-align: right; /* depends on element width */
   }
Run Code Online (Sandbox Code Playgroud)

有了这个html:

<span class="align-left">this shows to the left<span><span class="align-right">this to the right<span>
Run Code Online (Sandbox Code Playgroud)

它在IE/FF中工作正常,但在Chrome中却不行?我不是CSS专家,但我想避免使用表格,任何建议?

Mat*_*att 8

关闭span标签,它会起作用.

参见示例:http://jsfiddle.net/ESQE7/