我有一個div標記和另一個div標記中的地址的時鐘。 我想在左側顯示時鐘,在右側顯示地址。現在地址顯示在時鐘下方。如何爲div標記添加css
<div class="new">
<div class="clock">
//my clock code
</div> //end of clock div
<div class="address">
<p> </p> //address
</div> //end of address div
</div> //end of new div
css
.new .clock{
margin:0;
padding:10px 0px 0 0;
float:left;
}
.address{
margin:0;
padding:30px 0px 50px 0px;
text-align:right;
}
浮動地址DIV右 - http://jsfiddle.net/Paulie_D/54pqbh2e/ 2/ – 2015-02-23 12:15:35
或者只是如果你想內聯元素反正使用的跨度? – adeneo 2015-02-23 12:16:16