Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why does IE ignore my form padding settings?

1 view
Skip to first unread message

drumz

unread,
Dec 17, 2009, 10:59:02 PM12/17/09
to
The contact page looks perfect in Firefox:
http://pjhalligancpa.com/test/contact.html
But ignores the spacing in IE

All margins and padding are reset at the very beginning of the CSS file (I
tried adding input but whether it's valid or not it didn't change anything):
Code:

body, address, blockquote, dl, ol, ul, li, form,
fieldset, h1, h2, h3, h4, h5, h6, p, pre {
margin:0;
padding:0;
}

Here's what the CSS has:
Code:

#contact-inputnames {
left: 10px;
width:140px;
height:40px;
color:#031053;
background-color:#8A87E0;
margin-bottom: 10px;
}

form {
margin-top: 0px;
background-color:#8A87E0;
padding: 4px;
color:#031053;
}

input {
border: 1px solid #666699;
background-color:#8A87E0;
padding: 2px;
color:#031053;
}

And the HTML:
Code:
<div id="contact-inputnames">**all but phone required
<input type="text" name="realname" value="Your name"
onblur="if(this.value == '') { this.value='Your name'}" onfocus="if
(this.value == 'Your name') {this.value=''}">
<br><input type="text" name="phone" value="Phone number"
onblur="if(this.value == '') { this.value='Phone number'}" onfocus="if
(this.value == 'Phone number') {this.value=''}">
<br><input type="text" name="email" value="E-mail"
onblur="if(this.value == '') { this.value='E-mail'}" onfocus="if (this.value
== 'E-mail') {this.value=''}">
</div>

So if there's a fix, I assume I need to create a separate CSS file for IE.
And then do I just have the same (name-wise) div's with the different
padding/margins? I would just do an IE sniff and point to the IE.CSS file for
the radical difference in padding?

Thanks in advance!

0 new messages