Ваша граница в значительной степени должна быть сделана с фоновыми изображениями. Вам понадобится одно изображение длиннее самого длинного элемента.
Выбранный класс вкладок должен иметь белую рамку вправо, а невыбранную вкладку - черную рамку справа.
Код:
<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>