Monday, November 19, 2012

Re: Dynamic Div styling question

The HTML helper is returning exactly what the API shows it should return.  If you want to create something like the style you posted above you would need to create something like this.

<style>
div#mycontainer {
<?php echo $this->Html->style(array('height'=> '200px'));?>
}
</style>


On Mon, Nov 19, 2012 at 1:27 AM, Michael Gaiser <mjgaiser@gmail.com> wrote:
So I am working on a helper which I want to dynamically set the div's size. 
I am using this:

    echo $this->Html->style(array('height' => '200px',));
But only getting this:
    height: 200px;
Where as I want something like this:
div#mycontainer{ height: 200px; }
    
Does anyone know how to use the HTML->style function with div's & brackets? Thanks
    
~Michael

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: