你的邊框幾乎不得不用背景圖片來完成。你會想要一個圖像比最長的項目更長。
選定的選項卡類應該有一個白色的右邊框,並且取消選擇的選項卡有一個黑色的邊框右邊。
代碼:
<style type="text/css">
.menu {
margin: 0;
padding: 0;
float: left;
width: 10%;
position: relative;
left: 2px;
}
.menu li {
/* Use a background image with your lines on all four sides */
border: 2px solid black;
background-color: green;
list-style: none;
margin: 0;
padding: 0;
}
.menu .selected {
/* Use a background image with your lines and a white background inside the tab */
border-right: none;
background-color: white;
}
.body {
border: 2px solid black;
margin-left: 10%;
}
</style>
<div>
<ul class="menu">
<li class="selected">Option 1</li>
<li>Option 2</li>
<li>Option 3</li>
</ul>
<div class="body">
Main content here Main content here Main content here Main content here Main content here Main content here Main content here Main content here
Main content here Main content here Main content here Main content here Main content here Main content here Main content here Main content here
Main content here Main content here Main content here Main content here Main content here Main content here Main content here Main content here
Main content here Main content here Main content here Main content here Main content here Main content here Main content here Main content here
Main content here Main content here Main content here Main content here Main content here Main content here Main content here Main content here
Main content here Main content here Main content here Main content here Main content here Main content here Main content here Main content here
Main content here Main content here Main content here Main content here Main content here Main content here Main content here Main content here
Main content here Main content here Main content here Main content here Main content here Main content here Main content here Main content here
</div>
</div>