开发者

Image button inside search field?

开发者 https://www.devze.com 2022-12-25 21:09 出处:网络
I was wondering how websites like bing.com or wolframalpha.com create their search buttons inside 开发者_如何学Goof of the text field? If you go to each website, you can see clearly what I mean.Get yo

I was wondering how websites like bing.com or wolframalpha.com create their search buttons inside 开发者_如何学Goof of the text field? If you go to each website, you can see clearly what I mean.


Get yourself Firebug as a plugin for Firefox. You can click on elements on the screen and see their CSS. It'll teach you LOADS of info about CSS. They actually use a negative margin to get that sucker to float over on Bing.com.

http://getfirebug.com/


Simple: the submit button (with transparent background) is above the input field.. :)


How about formatting according to this search box background image idea?

http://zenverse.net/create-a-fancy-search-box-using-css/


@dscher -

Here's the code, it works fine in Opera, but no other browser.

submit_form {

background:transparent url(submit.png) no-repeat;
border:0 none;
width:16px;
height:16px;
overflow:hidden;
font-size:0px;
text-decoration:none;
cursor: pointer;
margin-top: 0px;
margin-left: -25px;
margin-right: 0px;
margin-bottom: 0px;
padding-top: 25px;
padding-left: 0px;
padding-right: 0px;
padding-bottom: 0px;

}

0

精彩评论

暂无评论...
验证码 换一张
取 消