搜索栏高度不会改变

时间:2011-07-11 22:16:09

标签: html css wordpress-theming

我正在使用Wordpress处理模板,到目前为止,它已经是基本的HTML,CSS和一些PHP,但我目前遇到了CSS的头部问题。

It currently looks like this.搜索栏已移至正确的位置,背景填充正确的颜色,但高度不会改变。我希望它上面有一些红色填充,以匹配左侧的对角线框。我已经尝试过改变高度,但这只是让它向下延伸到页面的底部,并且到顶部的边界或者只是四周都没有做任何事情。我在这个搜索框的css上做错了什么?

以下是搜索框的css代码。

/* Top search */

#nav-search {

  background-color:#990000;

  width: 250px;

  display: block;

  height: 30px;

  line-height: 16px;

  position: absolute;

  right: 0px;

  top: -22px;

}

#nav-search label {

  display: none;

}

#s,
#searchsubmit {

  border-radius: 3px 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;

}

#s {

  border: 1px solid #000099;

  font-size: 11px;

  height: 15px;

  padding: 4px 5px 2px;

  width: 130px;

}
#nav-search #s {

  border-color: #000099; border-bottom-color: #0000BE; border-right-color: #000099;

}

#searchsubmit {

  background: #669900 url(img/button-style-input.png) center left repeat-x;

  border: 1px solid #666;

  color: #fff;

  font-size: 11px;

  height: 23px;

  letter-spacing: 1px;

  line-height: 20px;

  padding: 0 5px;

  -moz-box-shadow: 0px 0px 1px #fff;

  -webkit-box-shadow: 0px 0px 1px #fff;

}

/* Fixes Firefox 2 and 3 */

#searchsubmit, x:-moz-any-link {

  padding: 0 5px 3px; *padding: 0 5px;

}

1 个答案:

答案 0 :(得分:1)

如果这是http://new-wav.com/的相同示例,请编辑#nav-search到以下内容:

  • 调整最高排名
  • 添加padding-top

希望这是有道理的

相关问题