Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
リンクとボタンがあり、それぞれが独自の div にあり、共有 div にラップされています。リンクはページの中央に配置され、ボタンはページの右側に配置されます。これを維持したいのですが、同じ行に 2 つの項目があります。これどうやってするの?
次のように、div でフロートを使用します。
<div class="wrapper"> <div class="center"> center </div> <div class="right"> right </div> </div>
そしてcssの場合:
.wrapper { width: 100%; } .center { float: left; margin-left: 50%; } .right { float: right; }
http://jsfiddle.net/uK5hM/