2017-04-14 61 views
0

我有一個自定義的404頁面。同樣的例子可以發現@http://www.techquark.com/123123使用自定義CSS去除邊框/背景

我需要使框邊框消失,背景爲白色。

對於我粘貼下面的CSS:

.status-msg-border {border: 0;} 
.status-msg-body {background-color: #ffffff;} 
.status-msg-wrap {width: 100%; margin: 0px auto;} 
.status-msg-bg {background: transparent;} 

但它沒有工作,箱子還是有邊框和顏色。下面是404頁代碼:

<div class='status-msg-wrap'> 
<div class='status-msg-body'> 
<div style="text-align: center;" trbidi="on"> 
<h2> 
404 Page Not Found</h2> 
Sorry but the page you are looking for cannot be found. 
<br/><br/> 
If you're in denial and think this is a conspiracy that cannot possibly be true, please try using the search box below or <a href="http://www.techquark.com/p/contact-us.html" target="_blank">contact me</a>. 
<br/><br/> 
<form action="/search" id="searchThis" method="get" style="display: inline; margin: 20px auto;"> 
<input id="searchBox" name="q" onblur="if(this.value=='')this.value=this.defaultValue;" onfocus="if(this.value==this.defaultValue)this.value='';" type="text" value="Search this blog" vinput="" /> <input id="searchButton" type="submit" value="Go" /></form> 
<br/><br/> 
You may also want to move to the <a href="http://www.techquark.com/" target="_blank">homepage</a> for a fresh start of our relationship. 
<br/><br/> 
<a href="http://1.bp.blogspot.com/-wNOn6Ndu7ws/WPCqTnFAxGI/AAAAAAAAozQ/NlRrQ9so7awQJdAwXcL9ZAUR08EV2lutQCK4B/s1600/404.jpg" imageanchor="1"><img border="0" src="https://1.bp.blogspot.com/-wNOn6Ndu7ws/WPCqTnFAxGI/AAAAAAAAozQ/NlRrQ9so7awQJdAwXcL9ZAUR08EV2lutQCK4B/s1600/404.jpg" /></a> 
</div> 
</div> 

這裏是輸出的,我很期待:

enter image description here

在同任何幫助,將不勝感激!

+0

@Shubham嗨,你能否詳細說明它多一點。我的意思是你提到哪個盒子。 – SreenathPG

+0

嗨,@SreenathPG。我剛剛添加輸出屏幕截圖我期待主要問題。 –

回答

0

在CSS中,嘗試添加border:1px solid transparent;併爲後臺嘗試背景顏色:白色。希望這可以幫助!

+0

謝謝,但沒有奏效。我使用新代碼: .status-msg-border {1px solid transparent;} .status-msg-body {background-color:white;} .status-msg-wrap {width:100%; margin:0px auto;} .status-msg-bg {background:transparent;} –

0

您需要使用自定義CSS進行覆蓋。

.status-msg-border {border: 0 !important;} 
.status-msg-body {background-color: #ffffff !important;} 
.status-msg-wrap {width: 100%; margin: 0px auto !important;} 
.status-msg-bg {background: transparent !important;} 

嘗試上面的代碼,它應該可以工作。

+0

嗨,我也使用你的代碼,仍然沒有改變。 –

0

當我檢查您的網站,我發現在控制檯以下:

.status-msg-border { 
    border: 1px solid #000; 
    filter: alpha(opacity=40); 
    -moz-opacity: .4; 
    opacity: .4; 
    width: 100%; 
    position: relative; 
} 

刪除行border: 1px solid #000;,它應該是罰款

或者嘗試.status-msg-border { border-width: 0px; }

希望這有助於

+0

不起作用。看起來它沒有考慮任何CSS。 –

0

固定,網站負載導致CSS覆蓋。我在網站的最後粘貼了CSS。

即使現在邊框和背景被加載,但當網站加載完成後它會再次被覆蓋。感謝大家 !

-1

<div class="status-msg-border" style="border: none; opacity: 0;">

只是這些內嵌樣式添加到您的div