html - Align text to the middle with Chinese text -
i having problem align text in same div when text in chinese.
pushes right span top reason.
there way fix issue?
.left{ float:left } .right{ float:right; } div{ clear:both; width:400px; }
<div> <span class="left">【夏向け】怖い、こっくりさん【ホラー】</span> <span class="right">android</span> </div> <div> <span class="left">hello world</span> <span class="right">facbook</span> </div> <div> <span class="left">【夏向け</span> <span class="right">android</span> </div> <div> <span class="left">this example text</span> <span class="right">android</span> </div>
you have use line-height
, font-size
property accordingly
.left{ float:left } .right{ float:right; } div{ clear:both; width:400px; line-height: 24px; }
<div> <span class="left">【夏向け】怖い、こっくりさん【ホラー】</span> <span class="right">android</span> </div> <div> <span class="left">hello world</span> <span class="right">facbook</span> </div> <div> <span class="left">【夏向け</span> <span class="right">android</span> </div> <div> <span class="left">this example text</span> <span class="right">android</span> </div>
Comments
Post a Comment