我有下面的HTML。我想这样做,以便它只是一个无边界的白色空间。我尝试用CSS去除边框,如下所示:#search-box {border: none;}
但这并不奏效。有什么想法吗?摆脱<input>框中的边框
这里是,它是在HTML:
<div id="topNav">
<span class="topNavLink" id="headingTitle" >Word 4 Word</span>
<span id="topNav1two">
<a href="#" id="home" class="topNavLink">Home</a>
<a href="#" id="new" class="topNavLink">New Test</a>
</span>
<span>
<input type="search" size="35" id="searchInput"><!--this is the search box-->
<input type="button" value="Search" id="searchBttn">
</span>
<span>
<a id="feedback" target="_blank" class="topNavLink">Help</a>
<a href="#" id="settings" class="topNavLink">Settings</a>
</span>
</div>
这里是相关的CSS:
/*Deals with the top nav*/
#topNav {
padding-top: 10px;
padding-bottom: 10px;
background: black;
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.topNavLink {
text-decoration: none;
color: orange;
padding-left: 10px;
padding-right: 10px;
}
#headingTitle {
font-size: 1.3em;
}
/* ends top nav */
/* Deals with the search bar */
#searchBttn {
height: 25px;
}
#searchInput{
border: none;
background: black;
}
/* ends the search bar */
如果这是你真正的代码的顶部跨度标签没有关闭。这会造成大量的错误。 – Kevin 2010-12-07 03:53:02
这是一个很好的观察。 – 2010-12-07 03:54:30
[我看不到边框](http://jsfiddle.net/kYPVR/)。请修复您的问题,以便我们看到您的问题。 – BalusC 2010-12-07 03:59:51