Jukka K. Korpela wrote:
> Peter Bradley wrote:
> 
>> I have a form that I can't get to format properly in IE (6 or 7).
> 
> It looks like you are using a definition list for the form fields. In 
> addition to being illogical, it also causes trouble in styling. The <dl> 
> element may have idiosyncratic rendering features in browsers, and using 
> float often causes browser differences.
> 
> It would be _far_ easier (and more logical) to use a table.
> 
> If you have been forbidden from using a table, you could use simply <label> 
> and <input> and <div> (or just <br>) elements, making the labels floated on 
> the left with specific width, much the way you are doing now. (Using a table 
> would be much more flexible, since then a browser would automatically select 
> the width for the column of labels according to the width requirements of 
> the longest label.) See a sketchy example at
> http://www.cs.tut.fi/~jkorpela/forms/tables.html#css

Hi Peter,

The DL.DT.DD family is a rare and unique jewel in the family of HTML 
tags and the only one I know of with such a relationship between the 
three elements in the sub-family. I've used it many times and been 
pretty happy with it. That being said, it doesn't fit in this case and 
there's already a set of tags for this.

I can understand Jukka's suggestion to use tables to achieve the desired 
effect and I've looked at his page, but I'd like to offer an 
alternative. One thing that is commonly overlooked is that the label 
element is permitted to wrap around it's associated input element such 
that instead of this:
<label for="thing">Label Text:</label><input name="thing" id="thing">
...we're also allowed this:
<label for="thing">Label Text:<input name="thing" id="thing"></label>

When we make the label element display:block, we then get a row we can 
work with. Throw your label text into a span, add a little float and 
negative margin magic and we can very closely emulate what we could 
achieve with tables.

I've prepared a snippet of your form using this method and published it 
at this URL:
http://theholiergrail.com/cssd/spanish-intensives-form.html

I hope it helps.
--Bill



-- 
<!--
  ! Bill Brown - <[EMAIL PROTECTED]> - 484-809-8077
  ! WebDevelopedia.com, TheHolierGrail, MacNimble.com
  ! 24 Countryside Drive, Johnston, RI 02919
-->
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to