让我的搜索框显示在正确的位置 [英] Make my search box show up in the right position

查看:97
本文介绍了让我的搜索框显示在正确的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将搜索框放在导航栏的中心?你会看到我的意思下面的意思是下面的图像.. ill post我的css代码为图像下面的搜索框。

how do i make the search box in the center of the nav bar? you will see what i mean below with the image.. ill post my css code for the search box below the image ..

   #advsearch {
   }
   #advsearch input[type="text"] {
       background: url(/images/search-dark.png) no-repeat 10px 6px #444;
       border: 0 none;
       font: bold 12px Arial, Helvetica, Sans-serif;
       color: #777;
       width: 150px;
       padding: 6px 15px 6px 35px;
       -webkit-border-radius: 20px;
       -moz-border-radius: 20px;
       border-radius: 20px;
       text-shadow: 0 2px 2px rgba(0, 0, 0, 0.3);
       -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2) inset;
       -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2) inset;
       box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2) inset;
       -webkit-transition: all 0.7s ease 0s;
       -moz-transition: all 0.7s ease 0s;
       -o-transition: all 0.7s ease 0s;
       transition: all 0.7s ease 0s;
   }
   #advsearch input[type="text"]:focus {
       width: 200px;
   }

感谢这么多的提前:)如果你想要我们可以在我的工作网站在一起?

thanks so much in advance :) if u want maybe we can work on my website together?

这里还有一个 Js Fiddle

推荐答案

在这里你需要修改一些css code。

Here you need to modify some css code.

#cssmenu > ul > li > a {
    color: #A0A0A0;
    font-family: Verdana,'Lucida Grande';
    font-size: 15px;
    /*line-height: 70px;
    padding: 0;*/
    position: relative;
    top: 7px;
    transition: color 0.15s ease 0s;
}

演示: http://jsfiddle.net/y5Fhc/8/

这篇关于让我的搜索框显示在正确的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆