0

I have created a simple login form. Here is a screenshot of the login form.

enter image description here

Here is the HTML code. I have used the 960 framework.

<article class="container_12">   
        <section id="login" class="grid_3">
                <form action="POST">
                    <div id="loginheader"></div>
                    <fieldset class="logininputfields">
                        <input type="text" name="username" placeholder="Username" autofocus>
                        <input type="password" name="password" placeholder="Password">
                    </fieldset>
                    <fieldset class="submitfield">
                        <input type="submit" value="Log In">
                    </fieldset>
                </form>
        </section> 
    </article>

and here is the CSS

#login
{
    height: 330px;
}

#loginheader
{
    background: black;
    height: 32px;
}

.logininputfields
{
    background-color: #e5e5e5;
    padding-left: 24px;
    padding-bottom: 40px;
    height: 160px;
}

.logininputfields input[type="text"],input[type="password"]
{
    background: #c8cbcc;
    margin-top: 30px;
    border:1px solid #ccc;
    color: #ededed;
    font-weight: 600;
    height: 30px;
    width: 170px;
}

.submitfield input[type="submit"]
{
    background: #0099ff;
    border: 1px solid #ccc;
    height: 42px;
    width: 220px;
    font-weight: 600;
    font-size: large;
    color: white;
}


.submitfield input[type="submit"]:hover
{
    background: rgba(0,154,255,0.60);
}

I don't understand why there is a space between the submit button and the gray area. How can avoid it?

Mazzy
  • 13,354
  • 43
  • 126
  • 207

2 Answers2

1

The browser you're viewing this in likely has default margins on all fieldsets. Try removing those margins page wide with something like this:

fieldset {
   margin:0px;
   padding:0px;
}
Chris Montgomery
  • 2,344
  • 2
  • 19
  • 30
0

In my case, the above solution din't work. I have added a blank <Col></Col> in order to get space between the fieldsets.

10 Rep
  • 2,217
  • 7
  • 19
  • 33
vinny
  • 360
  • 3
  • 10