Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#2 2007-12-05 12:37:04

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#4 2007-12-06 21:23:23

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

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 use CSS 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

#6 2007-12-07 11:06:53

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

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

#8 2007-12-07 11:49:42

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

Re: break tag between search label and input field

i wanted to use txp tags, but if not possible, than it’s not possible…

Why? It’s the same if you use XHTML or txp:search_input – it only outputs the same form, but via function.

Cheers!

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

#10 2007-12-08 10:29:04

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

Re: break tag between search label and input field

XHTML: less functions.

Offline

Board footer

Powered by FluxBB