Sorry, yes it has the inline argument in its definition, but I couldn't see how to get it to actually render the style tags themselves (only the content that would go between them) - am I missing something?
Cheers, Toby On May 7, 4:27 pm, brian <[email protected]> wrote: > /** > * Builds CSS style data from an array of CSS properties > * > * @param array $data Style data array > * @param boolean $inline Whether or not the style block should be > displayed inline > * @return string CSS styling data > */ > function style($data, $inline = true) { > > On Thu, May 7, 2009 at 3:33 AM, toby1kenobi <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
