我有以下的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>