Note:
<div class="label">Something</div>
<div class="inputfield"><input type="text" ..../></div>
<div class="label">Something2</div>
<div class="inputfield"><input type="text" ..../></div>
..will create an invalid form: You MUST have a label linked to every
input element.
Here's a snippet from my own cake.generic.css:
/*
* forms
*/
#content form {
padding: 16px;
background-color: #DDD;
-moz-border-radius: 16px;
}
#content fieldset {
border: 0;
}
#content legend {
color: #06C;
font-size: 3em;
line-height: 1.2em; color : #06C;
font-weight: bold;
}
#content form div.input {
clear: both;
margin: 8px 0;
background-color: #EEE;
padding: 2px;
-moz-border-radius: 4px;
border: 1px solid #EEE;
}
#content form div.input.required {
font-weight: bold;
}
#content form div.input.error {
border-color: #900;
background-color: #FCC;
color: #900;
}
#content form div.input label {
float: left;
width: 14em;
margin-right: .5em;
}
#content form div.text input,
#content form div.password input,
#content form div.select select,
#content form div.datetime select,
#content form div.textarea textarea {
border: 1px solid #CCC;
padding: 2px;
font-size: 1.2em;
font-family: verdana, sans-serif;
}
#content form div.textarea textarea {
width: 40em;
height: 20em;
}
#content form option {
padding-right: .5em;
}
#content form div.input.error div.error-message {
margin-left: 14.5em;
padding: 2px 2px 2px 22px;
background: url(../img/icons/error.png) no-repeat 2px center;
}
#content form div.input input.form-error {
border-color: #C00;
}
#content form div.submit input {
margin-left: 7.25em;
border: 4px solid #FFF;
padding: 2px 4px;
background: #06C none no-repeat 4px center;
color: #FFF;
font-weight: bold;
font-size: 2em;
cursor: pointer;
-moz-border-radius: 8px;
}
#content form div.submit input:hover {
background-color: #9C9;
color: #333;
text-decoration: none;
}
I'm preparing an article for the Bakery about styling Cake layouts and
views as we speak...
On Sep 22, 2:57 pm, toby78 <[EMAIL PROTECTED]> wrote:
> Thanks, this works.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---