You can pass a CSS class specifically to your label element.

i.e. $form->input('MyModel.my_field', array('label'=>array
('text'=>'Please enter something here', 'class'=>'class-for-this-
label')));


On Dec 10, 6:43 pm, maytawn <mayt...@gmail.com> wrote:
> I have an instance where I need to increase the width and style of the
> <label> tag that is automatically created with the $form->input()
> method.  Since I already have a base CSS defined for all <lable> tags
> I would like to add some inline CSS using the style="" attribute.  I
> am able to add the style="" attribute to the <input> tage using the
> 'options' key 'style' as shown below.
> echo $form->input('password', array('label' => 'New Password:', 'type'
> => 'password', 'style' => 'width:150px', 'after' => '<br />'));
>
> Is there a way to pass in a parameter that would allow me to do the
> same for the <lable> tag?
--~--~---------~--~----~------------~-------~--~----~
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