Link_to vs button to and CR

I have in my application.rhtml a series of links that can help
navigate the application.

When I link_to I get the links on one horizontal line.

When I button_to I get a carriage return after each button.

link_to:

button_to:

is there a way to control this behavior or a work around?

Thanks!

On Nov 17, 2007, at 6:23 PM, john95127 wrote:

is there a way to control this behavior or a work around?

That helper creates a FORM with a DIV inside, which are block-level
elements. You may control that a bit with CSS, with something like this:

...

and then something like this:

#buttons form, #buttons div { display: inline }

This is all untested, but you see how it goes.

– fxn

Can you show me how? I’m really new…

On Nov 17, 2007, at 7:10 PM, john95127 wrote:

Can you show me how? I’m really new…

Once you got the buttons wrapped in the DIV throw

#buttons form, #buttons div {
display: inline
}

into stylesheets/application.css for instance, and load the stylesheet
in the layout:

<%= stylesheet_link_tag “application.css” %>

Once said that, take into account that to let the user navigate to
other pages you normally use links.

– fxn