Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#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
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
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
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.
Offline
Pages: 1