Karl Lurman wrote:
> How am I going to highlight the label input
> pair without a container div? A fieldset?
Hello Karl,
I will add a div or paragraph to a form if needed. A division in the form
normally marked by color or a border is okay (as that slight meaning will be
carried by the Div in the same way) and if -- I don't usually -- I'm after a
style I can't seem to achieve with the form's own elements. I just don't
feel a table or list is the right way. Paragraph elements for errors if
they're on the same page are okay, and spans are like little bundles of air
so they're okay. I don't want to add something to the form that is going to
disrupt its inherent goodness, so to speak.
Now, regarding your example, I wonder if something like this could be done
in the partial form example below (?). Just thinking out loud. It's late
here so I haven't the time to test it...
<p>Fields marked with * (asterisk) are required.</p>
<label><span>*</span> Name: <?php echo $error; ?>
<input value="" />
</label>
- Note: Error would be empty if not applicable. And the script outputted
error would be in an unclassed span like the asterisk.
Okay, now here's the proposed CSS...
label {
display : block;
width : 99%;
height : auto;
padding : 5px 10px;
margin : 5px;
text-align : right;
border : 1px solid #000;
background-color : #eee;
}
label span {
color : red;
font-weight : bold;
}
input {
width : 30%;
text-align : left;
margin : 5px;
display : inline;
border : 1px solid #666;
background-color : #f9f9f9;
}
I'm *guessing* the input will display within the somewhat styled label. But
like I wrote, I didn't test it, I'd most likely have to fuss with it. And if
I had to have the styling but couldn't figure it out eventually, I think the
best remaining solution would be a Div so that's what I'd use too.
Cheers.
Mike Cherim
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************