我有以下html和CSS.但我无法弄清楚的是如何在主div的右侧设置标签div.所以他们像书签一样伸出正确的位置.
.main { -moz-border-radius:10px; height: 75%; width: 60%; position: absolute; top: 15%; left: 20%; right: auto; } .tabs { width: 50px; height: 1.3em; position: absolute; float: right; } #tab { margin: 10px 10px 10px 0px;}
和HTML:
<div class="main"> <div id="content"> Some main content </div> </div> <div class="tabs"> <div class="tabs" id="tab1"> <a href="#" alt="Home"> Home </a> </div> <div class="tabs" id="tab2"> <a href="#" alt="About"> About </a> </div> </div>