Hi toby,

>  I want to avoid having a css entry for every single input field and
>  would like to use a class.
>
>  How can this be done in cakePHP, so that all "labels" use the same css
>  class  ?

Cake wraps the label and input in a div, by default it applies a class
of 'input' to that div. So you don't need to give the label a class,
just apply to all labels inside .input, eg:

<div class="input text">
        <label for="UserUsername">Username</label>
        <input name="data[User][username]" type="text" class="text"
maxlength="255" value="" id="UserUsername" />
</div>

<style type="text/css" media="screen">
        
        .input {
                clear: both;
        }
        
        .input label {
                float: left; width: 40%;
        }
        
        .input input.text {
                float: right; width: 40%;
        }
        
</style>

hth

jon

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to