views:

44

answers:

2

Having some nasty issues with IE6 and reading my div form layout, the html:

<form id="brochureForm" name="brochureForm" action="/how-it-works/request-a-brochure/" method="post">
        <div class="row">
            <div class="label">
                <label for="szName">Name</label>
            </div>
            <div class="field">
                <input type="text" name="szName" id="szName" value="#form.szName#" />
            </div>
            <div class="clear"></div>
        </div>
        <div class="row">
            <div class="label">
                <label for="szCompanyName">Company Name</label>
            </div>
            <div class="field">
                <input type="text" name="szCompanyName" id="szCompanyName" value="#form.szCompanyName#" />
            </div>
            <div class="clear"></div>
        </div>
        <div class="row">
            <div class="label">
                <label for="szAddress">Address</label>
            </div>
            <div class="field">
                <input type="text" name="szAddress" id="szAddress" value="#form.szAddress#" />
            </div>
            <div class="clear"></div>
        </div>
        <div class="row">
            <div class="label">
                <label for="szTown">Town/City</label>
            </div>
            <div class="field">
                <input type="text" name="szTown" id="szTown" value="#form.szTown#" />
            </div>
            <div class="clear"></div>
        </div>
        <div class="row">
            <div class="label">
                <label for="szPostcode">Postcode</label>
            </div>
            <div class="field">
                <input type="text" name="szPostcode" id="szPostcode" value="#form.szPostcode#" />
            </div>
            <div class="clear"></div>
        </div>
        <div class="row">
            <div class="label">
                <label for="szTelephone">Tel</label>
            </div>
            <div class="field">
                <input type="text" name="szTelephone" id="szTelephone" value="#form.szTelephone#" />
            </div>
            <div class="clear"></div>
        </div>
        <div class="row">
            <div class="label">
                <label for="szEmail">E-mail</label>
            </div>
            <div class="field">
                <input type="text" name="szEmail" id="szEmail" value="#form.szEmail#" />
            </div>
            <div class="clear"></div>
        </div>
        <div class="submitrow">
            <input type="image" name="szSubmit" id="szSubmit" src="/images/form/submit.gif" class="submitRO" />
        </div>
    </form>

And then the CSS:

.row {width:314px;margin:0 0 8px 0;}
.row .label {width:103px;padding:3px 16px 0 0;float:left;text-align:right;}
.row .field {width:195px;float:left;}
.submitrow {width:314px;text-align:right;padding:3px 0 0 0;}

The result can be shown here:

http://yfrog.com/ccieisshitej

Working fine in IE8/7 firefox etc. Any tips would be appreciated!

A: 

IE6 sometimes doesnt get margins and paddings right. Try to reduce them a few pixels.

Rito
+1  A: 

Also, as a rule of thumb when dealing with IE6, try adding display:inline to your floating divs

Jimmy
That worked a treat (along with playing with margin, stupid IE6 3px bug)
Jonathon Joyce