Hello all,
I''m perplexed by the following:
I''ve implemented flash messages in my application.rhtml with:
<% for name in [:notice, :warning, :message] %>
<% if flash[name] %>
<%= "<p id=\"#{name}\"
class=\"flash\">#{flash[name]}</p>" %>
<% end %>
<% end %>
I''ve implemented CSS in application.rhtml with:
<%= stylesheet_link_tag "avcnotes" %>
Now, each of these things works--my flash messages appear when they
should, and my styles are applied to all the pertinent elements...EXCEPT
flash messages. In avcnotes.css I have (among other things):
.notice {
color:yellow
}
.warning {
color:red
}
.message {
color:yellow
}
#flash {
border:1px solid black;
width:100%;
text-align:center
}
No matter what I''ve tried, these styles are not applied to my flash
messages. Is there a step/trick/hack I''m missing here?
Thanks in advance,
-ELf
--
Posted via http://www.ruby-forum.com/.
you''ve got your id''s and classes backwards... On May 2, 2006, at 4:05 PM, Matthew Feadler wrote:> Hello all, > > I''m perplexed by the following: > > I''ve implemented flash messages in my application.rhtml with: > > <% for name in [:notice, :warning, :message] %> > <% if flash[name] %> > <%= "<p id=\"#{name}\" class=\"flash\">#{flash[name]}</p>" %> > <% end %> > <% end %> > > I''ve implemented CSS in application.rhtml with: > > <%= stylesheet_link_tag "avcnotes" %> > > Now, each of these things works--my flash messages appear when they > should, and my styles are applied to all the pertinent > elements...EXCEPT > flash messages. In avcnotes.css I have (among other things): > > .notice { > color:yellow > } > .warning { > color:red > } > .message { > color:yellow > } > #flash { > border:1px solid black; > width:100%; > text-align:center > } > > No matter what I''ve tried, these styles are not applied to my flash > messages. Is there a step/trick/hack I''m missing here? > > Thanks in advance, > > -ELf > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Matthew Feadler wrote:> Hello all,> Now, each of these things works--my flash messages appear when they > should, and my styles are applied to all the pertinent elements...EXCEPT > flash messages. In avcnotes.css I have (among other things): > > .notice { > color:yellow > } > .warning { > color:red > } > .message { > color:yellow > } > #flash { > border:1px solid black; > width:100%; > text-align:center > } > > No matter what I''ve tried, these styles are not applied to my flash > messages. Is there a step/trick/hack I''m missing here?You''ve got your signifiers switched. # is the code for "id" and . is the code for "class". #notice #warning #message and .flash Jeff Coleman -- Posted via http://www.ruby-forum.com/.