Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-15 15:25:05

Josefin
Member
Registered: 2008-01-30
Posts: 18

How to change search button to image?

I would like to replace the searchbutton with an image (searchbutton.gif)

How do I do this in the textpattern code search_input?

<txp:search_input label=” “ button=“search” size=“15” wraptag=“p” section=“search” />

/Josefin

Offline

#2 2008-02-15 15:37:48

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: How to change search button to image?

You could use CSS with selectors that doesn’t work with older browsers or you could alter the form:

<form method="get" action="<txp:site_url />search" id="search">
	<input type="text" name="q" value="" />
	<input type="submit" value="Search" class="button" />
</form>

and then with CSS:

.button {
	text-indent: -9000px;
	float: left;
	width: 200px;
	height: 20px;
	background: url(../images/searchbutton.gif);
}

Or you could use submit tag and img inside it, or you could use image input (type=“image”), you choose :)

Offline

Board footer

Powered by FluxBB