Reply
IE Form margin problem
Old 05-22-2008, 06:37 PM IE Form margin problem
KkillgasmM's Avatar
Ultra Talker

Posts: 359
Name: El Phantasmo
Location: England, north west
I have a form on a webpage, contained in a div. I have set the margin and paddings of both elements appropriately, but for some reason in IE the left margin is too small!

Here is the code, if anyone could help that would be great!

Code:
<div class="infoBox"><span class="infoBoxHead">login</span>
        <div>
          <div>
            <form action="" method="post" name="frmLogin" class="login" id="frmLogin">
              <p>
                <label for="textfield">username</label>
                <input name="textfield" type="text" id="textfield" size="20" />
              </p>
              <p>
                <label for="label">password</label>
                <input name="textfield2" type="password" id="label" size="20" />
              </p>
              <p>
                <input name="btnLogin" type="submit" class="button" id="btnLogin" value="Login" />
              </p>
            </form>
          </div>
        </div>
      </div>
Code:
.infoBox {
padding:0 5px;
margin-top:10px;}

.infoBoxHead {
display:block;
background:url(../image/bgHead.jpg) repeat-x 0 0;
font-size:120%;
margin:0;
padding:.3em;
color:#FFF;}

.infoBox p {
padding:2px 0;
margin:0;}

.infoBox ul {
padding-left:15px;
margin-bottom:5px;}

.infoBox div {
padding:0 4px;}

.infoBox div div {
border:#1DA7C5 solid;
border-width:0 1px 1px 1px;
padding-top:1px;}


form {
width:500px;
margin:5px auto;
padding:5px;
clear:both;
background-color:#F8F8F8;
border:#CCC solid 1px;
color:#666;}

form h1 {
margin-top:0;}

input, textarea {
background-color:#FFF;
border:#42C3FA solid 1px;
color:#39AFDD;
padding:2px;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;}

label {
display:block;
color:#555;
text-align:right;
margin:0 .5em 0 0;
padding:.25em 0 0 0;
color:#999;}

.login {
width:140px;
background-color:#FFF;
clear:both;
border:none;
margin:0 0 0 5px;
padding:0;
border:#000 solid 1px;}

.login label {
text-align:left;
width:70px;}

.button {
margin:.25em 0 0 .5em;}
I think thats all the necessary code
__________________
New Portfolio

Last edited by KkillgasmM : 05-22-2008 at 06:38 PM.
KkillgasmM is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 05-22-2008, 07:45 PM Re: IE Form margin problem
LadynRed's Avatar
Super Moderator

Posts: 6,539
Location: Tennessee
What version of IE ? IE7 has a bug with inherited margins on forms
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-23-2008, 04:26 AM Re: IE Form margin problem
KkillgasmM's Avatar
Ultra Talker

Posts: 359
Name: El Phantasmo
Location: England, north west
Yup, its IE7. Not sure what its like in 6 just yet.
__________________
New Portfolio
KkillgasmM is offline
Reply With Quote
View Public Profile
 
Old 05-23-2008, 10:57 AM Re: IE Form margin problem
LadynRed's Avatar
Super Moderator

Posts: 6,539
Location: Tennessee
For IE7, here's the info on the bug: http://www.positioniseverything.net/...ed_margin.html
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-23-2008, 05:30 PM Re: IE Form margin problem
KkillgasmM's Avatar
Ultra Talker

Posts: 359
Name: El Phantasmo
Location: England, north west
Thanks.
__________________
New Portfolio
KkillgasmM is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to IE Form margin problem
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12556 seconds with 12 queries