rubyonrailsin

A Ruby and Rails talk

Wednesday, March 17, 2010


Re: [Rails] Re: Problem with content-position and background-color in a sidebar

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

On 17 March 2010 16:52, RichardOnRails
<RichardDummyMailbox58407@uscomputergurus.com> wrote:
>...
> app\views\layouts\expenses.html.erb:
> <body>
>    <p style="color: green"><%= flash[:notice] %></p>
>
>    <table width="100%">
>        <tr>
>            <td>  <%= yield %>              </td>
>            <td>  <%= yield :sidebar %>  </td>
>        [snip]
> app\views\expenses\new.html.erb (at the bottom):
>        <% content_for :sidebar do %>
>          This is my sidebar stuff from:<br>
>            new.html.erb<br>
>            RTS\app\views\expenses
>        <% end %>

I don't see where you are putting this in a div with id=sidebar.
Should you have
<% content_for :sidebar do %>
<div id="sidebar">
This is my sidebar stuff from:<br>
new.html.erb<br>
RTS\app\views\expenses
</div>
<% end %>
or something similar?

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive