Just a wild guess, I haven't tested it:
Cakephp puts form elements in a div which is a block element. So you have to define a class which you add to the array of your $form->input, which defines them as a inline element.
echo $form->input('name',array('type'=>'checkbox', 'class' => 'iaminline'));
Hope that helps
Anja
-----Ursprüngliche Nachricht-----
Von: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] Im Auftrag von Al
Gesendet: Donnerstag, 4. Dezember 2008 02:17
An: CakePHP
Betreff: horizontal checkbox layout
I hope someone can help, I'm trying to make multiple select checkboxes go horizontal instead of vertical.
I use this in my view, which results in a 5-selection set of checkboxes.
echo $form->input('Semester', array('type'=> 'checkbox', 'multiple'=>'checkbox'));
I can use it just fine, it updates the database and so forth.
What I'd like to do though is have the checkboxes go from left to right, instead of vertical.
I thought I could do this by assigning a float:left to the class of the input, but it doesn't seem to work. Upon closer inspection it looks like the default cake.generic.css already is floating checkboxes left. So I'm a little lost.
Is this something so simple I can't find the answer because everyone knows how to do it?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment