Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-06-07 03:57:53

darock
Member
Registered: 2007-11-23
Posts: 54

Styling the search button

I’m using the txp:search_input tag. Given that it doesn’t have a attribute to style the search button, is there another way of going about this?

Offline

#2 2008-06-07 04:39:21

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Styling the search button

it has a wraptag attribute you can use. or you could just use regular html and skip the tag altogether

<input id="searchbar" type="text" name="q" />

(place within form tags of course)

Offline

#3 2008-06-07 05:39:01

darock
Member
Registered: 2007-11-23
Posts: 54

Re: Styling the search button

what exactly would I put within the wraptag? i never quite grasped the concept of wraptag other than knowing one can put html in it, I guess.

Offline

#4 2008-06-07 06:34:48

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

Re: Styling the search button

What iblastoff was meaning is, you could just use regural html.

In examle, as iblastoff adviced:

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

Then with CSS, in example:

#searchform button {
	background: #000;
	border: 1px solid #ccc;
	padding: 200px;
}

darock wrote:

what exactly would I put within the wraptag?

In general, wraptags should contain html element. In example p or div.

Last edited by Gocom (2008-06-07 06:36:36)

Offline

#5 2008-06-07 15:04:09

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Styling the search button

darock wrote:

what exactly would I put within the wraptag? i never quite grasped the concept of wraptag other than knowing one can put html in it, I guess.

Usually, the idea of having a wraptag (as an attribute of a <txp:tag />) is useful when the tag can return an empty string.
Example:
If you have
<p><txp:tag /></p>
and the output of the tag is empty, you will end with an empty element: <p></p>.
But if you have:
<txp:tag wraptag="p" /> and the output is empty, you won’t get the empty element.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB