2017-09-28 69 views
1

我有一個問題,不知道如何解決。我有聯繫表7的形式,看起來像這樣:如何從聯繫表格7中刪除頂部,右側和左側邊框?

enter image description here

並希望刪除頂部,左側和右側邊框的領域,所以看起來就像這樣:

enter image description here

所以我的問題是需要做些什麼才能獲得這樣的外觀?我在谷歌搜索和Stackoverflow回答了問題,但沒有找到像我這樣更接近的問題。這是控制該部分的代碼:

.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-text, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-number, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-date, 
.cf7_custom_style_1 textarea.wpcf7-form-control.wpcf7-textarea, 
.cf7_custom_style_1 select.wpcf7-form-control.wpcf7-select, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-quiz{ 
    border-color: #949494; 
    border-width: 1px; // Probably something here need to be changed? 
    border-style: outset; 
    color: #949494; 
    font-family: Raleway; 
    padding-top: -2px; 
    padding-bottom: -2px; 
    } 

任何幫助?

回答

2

嘗試:

.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-text, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-number, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-date, 
.cf7_custom_style_1 textarea.wpcf7-form-control.wpcf7-textarea, 
.cf7_custom_style_1 select.wpcf7-form-control.wpcf7-select, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-quiz{ 
    border: none; 
    border-bottom-color: #949494; 
    border-bottom-width: 1px; // Probably something here need to be changed? 
    border-bottom-style: outset; 
    color: #949494; 
    font-family: Raleway; 
    padding-top: -2px; 
    padding-bottom: -2px; 
    } 

這將刪除除底部以外的邊框。

1

您可以獨立控制箱模型的每個尺寸。

border-right-width: 0px; 
border-top-width: 0px; 
border-left-width: 0px; 
1

如果你能改寫這個風格,更好的方法是定義只有底邊框,這樣的:

div { 
 
    width: 100px; 
 
    height: 100px; 
 
    background-color: violet; 
 
    border-bottom: 5px black solid; 
 
}
<div></div>

如果沒有,你需要刪除不必要的邊界(頂部,左側和右側)。你可以這樣說:

border-top: none; 
border-left: none; 
border-right: none; 

或者,如果它不會工作,你必須添加!important標誌來掌管:

border-top: none !important; 
border-left: none !important; 
border-right: none !important; 

小演示:

div { 
 
    width: 100px; 
 
    height: 100px; 
 
    background-color: violet; 
 
    border: 5px black solid; 
 
    border-top: none; 
 
    border-left: none; 
 
    border-right: none; 
 
}
<div></div>

相關問題