That (addScript) doesn't appear to be a cake method?

On May 7, 11:15 am, majna <majna...@gmail.com> wrote:
> <?php
> $style = '<style type="text/css" media="screen">
>                         #navigation-holder a#logo span {
>                              background:transparent url(../img/logo.jpg) 
> no-repeat left
> top;
>                         }
>                </style> ';
>
> $this->addScript('test',  $style);
> ?>
>
> On May 7, 9:33 am, toby1kenobi <toby.math...@gmail.com> wrote:
>
> > Hi there,
>
> >   As mentioned, the styles are dynamically generated, I can't use a
> > static file (is that what you mean?). $html-> 'seems' to only render
> > style information inline - I could use this, but the code is executing
> > in the context of an element that isn't in the document's head, it's
> > in the body (the style tag is invalid outside the head).
>
> > Toby
>
> > On May 6, 4:12 pm, brian <bally.z...@gmail.com> wrote:
>
> > > Why not just put that in your regular stylesheet? If you're trying to
> > > override an existing style, you can use a class.
>
> > > Anyway, have a look at the $html->style() method:
>
> > >http://api.cakephp.org/class/html-helper#method-HtmlHelperstyle
>
> > > Also, your path can be absolute -> url(/img/logo.jpg)
>
> > > On Wed, May 6, 2009 at 7:30 AM, toby1kenobi <toby.math...@gmail.com> 
> > > wrote:
>
> > > > Hi everyone,
>
> > > >  I'd like to add some dynamically generated CSS to my document head
> > > > from within an element, is that possible? Ideally I'd like to insert
> > > > something like:
>
> > > > <style type="text/css" media="screen">
> > > > #navigation-holder a#logo span {
> > > > background:transparent url(../img/logo.jpg) no-repeat left top;
> > > > }
> > > > </style>
>
> > > > to $scripts_for_layout, I can't see how to do this though?
>
> > > >  Thanks in advance,
>
> > > > Toby
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to