Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-12-05 12:29:53
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
break tag between search label and input field
how to get rid of it? i want to display label and input field in one line.
my code:
<txp:search_input label="Search" wraptag="p" />
Offline
Re: break tag between search label and input field
Have a look at your source code and simply copy the form code directly into your template instead of the txp tag, then remove the “br” tag (I think it is). This will also give you a bit more flexibility as you can add other id and class tags of your own.
Last edited by thebombsite (2007-12-05 12:38:08)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#3 2007-12-06 10:28:21
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: break tag between search label and input field
thebombsite wrote:
Have a look at your source code and simply copy the form code directly into your template instead of the txp tag, then remove the “br” tag (I think it is).
…I decided to use search button instead of label and this solution saticfied me ;) but…
can you tell me: why IE 6.0 displays my search field and button much bigger and wider than Opera and Firefox do? take a look
can I do something about it?
Offline
Re: break tag between search label and input field
Gallex, because different browsers reads and produces size
-attribute differently. To have it completely same size with every browser, you should use CSS
to set the width.
In example:
#sidebar-1 input {
background:#27185b;
font-size: 12px;
margin: 3px;
padding: 1px;
color:#fff;
border: 1px solid #a9a3bd;
line-height: 12px;
width: 120px;
}
Cheers!
Offline
#5 2007-12-07 10:57:08
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: break tag between search label and input field
Gocom wrote:
Gallex, because different browsers reads and produces
size
-attribute differently. To have it completely same size with every browser, you should useCSS
to set the width.
In example:
bc. #sidebar-1 input { line-height: 12px; width: 120px;
}
aa, now i get it, thanks Gocom! but…it stretches submit button to 120px as well, I don’t want that. How can i set button width differently?…and i would like to use txp tags to achieve that, is it possible?
my code:
<txp:search_input label="" button="search" wraptag="p" />
Last edited by Gallex (2007-12-07 10:57:42)
Offline
Re: break tag between search label and input field
Yes, it will make also the input to width of 120px as well, and because search-input doesn’t allow class- or id-attributes you should just hand code it:
<form action="<txp:site_url /><txp:s />" method="get">
<input type="text" name="q" value="" size="15" id="q" />
<input type="submit" value="Hae" id="submit" />
</form>
It does exactly the same as the default txp:search_input
because it just outputs (X)HTML, nothing else.
Cheers!
Offline
#7 2007-12-07 11:43:02
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: break tag between search label and input field
Gocom wrote:
Yes, it will make also the input to width of 120px as well, and because search-input doesn’t allow class- or id-attributes you should just hand code it:
i wanted to use txp tags, but if not possible, than it’s not possible…
Offline
Offline
#9 2007-12-08 09:24:00
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: break tag between search label and input field
Gocom wrote:
Why?
less code ;)
Offline
Offline