Unwanted line break

In using form helpers, where I specify:

<%= f.label “Amount $” %>
<%= f.text_field :amount %>

I get a line break between the label and the text field. How do I
precent that? Thanks, Rvince

Use “-” at the end of the code in the view, like this:
<%= f.label “Amount $” -%>
<%= f.text_field :amount -%>


    Agustin Viñao

www.agustinvinao.com.ar
agustinvinao (Skype)

RVince wrote:

I get a line break between the label and the text field. How do I
precent that?

Agustin Viñao wrote:

Use “-” at the end of the code in the view, like this:
<%= f.label “Amount $” -%>
<%= f.text_field :amount -%>


    Agustin Viñao

www.agustinvinao.com.ar
agustinvinao (Skype)

Wait… Do you mean that you’re getting a unwanted line break in the
HTML source, or on the rendered web page? <%= -%> will prevent line
break characters in the underlying HTML source code, but that line break
character should not generate a new line in the rendered HTML. That
should require a
tag.

On Fri, Oct 23, 2009 at 1:21 PM, Robert W.
[email protected] wrote:

<%= f.label “Amount $” -%>
<%= f.text_field :amount -%>

Wait… Do you mean that you’re getting a unwanted line break in the
HTML source, or on the rendered web page? <%= -%> will prevent line
break characters in the underlying HTML source code, but that line break
character should not generate a new line in the rendered HTML. That
should require a
tag.

…or the LABEL or TEXTAREA (or both) being declared as a block
element in the CSS.


Hassan S. ------------------------ [email protected]
twitter: @hassan

Robert W. wrote:
[…]

Wait… Do you mean that you’re getting a unwanted line break in the
HTML source, or on the rendered web page? <%= -%> will prevent line
break characters in the underlying HTML source code, but that line break
character should not generate a new line in the rendered HTML. That
should require a
tag.

Small nitpick: in the rendered HTML, you’d actually need a
tag.

is XHTML syntax, and is not actually valid HTML 4.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]