# No line break between text and auto complete

**URL:** <https://www.ruby-forum.com/t/no-line-break-between-text-and-auto-complete/172292>\
**Category:** Rails\
**Created:** [July 18, 2009, 7:02pm UTC](https://www.ruby-forum.com/t/no-line-break-between-text-and-auto-complete/172292 "2009-07-18T19:02:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/dbc845/32.png) [@Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/u/Ruby_on_RailsS_Talk)\
**Post date:** [July 18, 2009, 7:02pm UTC](https://www.ruby-forum.com/t/no-line-break-between-text-and-auto-complete/172292/1 "2009-07-18T19:02:11Z")

</div>

Hey  
I’ve got the following code in my view for an application I’m writing:

Type the surname of the customer you wish to see: \<% form\_remote\_tag(:url =\> {:action =\> "findcust"}) do %\> \<%= text\_field\_with\_auto\_complete :customer, :last, { :indicator =\> "activity\_indicator", :size =\> 20}, { :skip\_style =\> true, :method =\> :get, :after\_update\_element =\> "function(element,value){" + remote\_function( :url =\> { :action =\> :findcust }, :with=\>"'id='+element.value") + ";" + "this.value='""';" + "}" } %\> \<% end %\>

But, for some reason, it’s placing a line break between the colon and  
the input field. How can I stop it doing this?

I’ve tried putting the following in my CSS but to no avail:  
input {  
display: block;  
}

Any help greatfully received!

Darren

---

<div class="post-metadata">

**Author:** ![Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/dbc845/32.png) [@Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/u/Ruby_on_RailsS_Talk)\
**Post date:** [July 19, 2009, 5:52am UTC](https://www.ruby-forum.com/t/no-line-break-between-text-and-auto-complete/172292/2 "2009-07-19T05:52:30Z")

</div>

On Sat, Jul 18, 2009 at 10:01 AM, Ruby on Rails:  
Talk[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Type the surname of the customer you wish to see: \<% form\_remote\_tag(:url =\> {:action =\> "findcust"}) do %\>

…

> But, for some reason, it’s placing a line break between the colon and  
> the input field. How can I stop it doing this?

Uh, “stop it”? FORM is a block level element; that’s the appropriate  
behavior. Mark up your page differently if you don’t want that.

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan
