<LgTextWh>"<%=h q.text %>" by <%=h q.author %>,
<%=h q.year
%></LgTextWh>
css doesn''t work that way. you can''t define your own tags,
you can
create style classes or apply styles to specific elements via the
element itself or an id attribute
ex:
/* class style */
.i-am-a-class {
font-size: 1.2em;
}
/* all h1 tags get this style */
h1 {
font-size: 1.6em;
}
/* style via id attribute*/
#menu {
text-align: left;
}
<span class="i-am-a-class">...</span>
<h1>...</h1>
<div id="menu">...</div>
so from what you have posted, you probably want something like:
.LgTextWh {font-size:125%; font-weight: normal; color: white}
<span class="LgTextWh">"<%=h q.text %>" by
<%=h q.author %>, <%=h q.year
%></span>
On 4/27/07, Mike Dershowitz
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
> Hello:
>
> I have an RJS tied to periodic update in one of my controllers. I want
> the output text to be stylized,, so I have the code in the RJS wrapped
> in custom style tags:
>
> <LgTextWh>"<%=h q.text %>" by <%=h q.author %>,
<%=h q.year
> %></LgTextWh>
>
> For some reason, this style isn''t being applied with each periodic
> update, although the HTML is definately being updated, as the data is
> refreshing, nor is it changing when I change the style in the RJS. I
> have also tried applying the style around the div that receives the HTML
> injection from the RJS, but that''s not working either.
>
> Here''s the style definition from my css:
>
> LgTextWh {font-size:125%; font-weight: normal; color: white}
>
> [NOTE: these are purposely not children of "body" as I needed
more
> flexibility in setting text standards.]
>
> And the code around the periodic update in my view:
>
> <div id="leftHeader">
> <table width="100%" border="0"
cellpadding="0" cellspacing="0" >
> <tr>
> <td width="50%" align="left"
valign="top">
> <%= image_tag "logo.gif" %>
> </td>
> <td width="50%" align="right"
valign="center">
> <%= periodically_call_remote(:url => {:controller =>
tasks:action =>
> ''quotes_panel''},
> :frequency => 60) %>
> <div id="quote"></div>
> </td>
> </tr>
> </table>
> </div>
>
> and the method that the periodic remote call uses:
>
> def quotes_panel
> @quote = Quote.find_by_sql("SELECT * FROM quotes ORDER BY RAND()
> LIMIT 1")[0]
> render :update do |page|
> page[''quote''].replace_html :partial =>
''quote_rand'', :locals => {
> :q => @quote}
> end
> end
>
> Thank you very much in advance for your help!
>
> Mike
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---