2011-02-01 101 views
0

我有兩個DIV包含新版本並且必須另一個包含整個數據。 兩個div都有紅色邊框。我刪除第一個div的底部邊框。刪除頂部邊框

我想刪除我在那裏用紅色標出的矩形邊框:

enter image description here

+1

您應該發佈您的代碼,因爲它很難在沒有看到您的HTML/CSS結構的情況下提供幫助。 – Kyle 2011-02-01 13:21:40

+0

你需要顯示你當前的HTML和CSS。 – thirtydot 2011-02-01 13:22:15

回答

0

您可以創建另一個div來佔據空間的「必須」選項卡的右側。將此div的底部邊框設置爲「1px純紅色」。然後,從新聞框中刪除邊框頂部,並從標籤本身中刪除邊框底部。

1

您的活動選項卡的內容框高出position:relativez-index。然後添加border-bottom: 1px solid white並給它margin-bottom: -1px

1

從當前項目:http://jsfiddle.net/aVZLH/1/

也許你對IE一些額外的工作。但基本的它應該告訴你一種方法來解決你的問題...沒有additioanl標記在你的文件。

<ul> 
    <li class="current">Tab #1</li> 
    <li>Tab #2</li> 
</ul> 
<div class="content"> 
    <p>MY AWESOME CONTENT</p> 
</div> 

/*CSS*/ 
ul { 
    overflow: hidden; 
    position: relative; 
    top: 1px; 
    z-index: 2; 
} 

li { 
    color:#fff; 
    background:red; 
    float:left; 
    border:1px solid red; 
    padding:5px 10px; 
    position:relative; 
    top:1px; 
} 

.current { 
    background: #FFFFFF; 
    border-bottom: 0; 
    color: red; 
} 

.content { 
    padding:20px; 
    border:1px solid red; 
    position:relative; 
    z-index:1; 
}