I am looking for a sign-in button like this: button

any clue how to create one like that?

Thanks in advance.

Member Avatar


<a id="loginBtn" style="position: relative;z-index:2;" class="greenBtn glyphicon glyphicon-lock" href="#"><span>Sign In</span></a>


Frameworks like Twitter Bootstrap use them. Have a look. I'm sure you can figure it out.

I don't think the bootstrap thing give answer.

How to create a sign in button that when you click it then a drop down down box appears?

Member Avatar


Well, you need to be clearer with your requests.

The title is just 'button' which is of no help whatsoever.
The question is misleading as you asked how to create a sign-up button like the one in the link. From looking at the site, you see an icon with text. I didn't think that we were supposed to actually click on the button. And even if we did, how were we supposed to know that you were interested in the dropdown?
Maybe the use of tags in the post would have helped too.

Help others to help you. This just frustrates and annoys would-be contributors. Good luck with it.

yes, I am interested in the dropdown. a button that can show a drop down when someone click on it. The drop down must also show a form that someone can filled-in.

How to create such a thing?

Try to look the code in first place.
I am very satisfied with Google Chrome right click Inspect element context
option. If you check it, you will see that login form is just div css-ed with
display: none; rule. With JS/jQuery you can make the magic removing that rule (class) or adding it again on click or triggering anyway you want.

Is it the same like creating normal drop down menu?

lol @ "button" ... I had to check this thread out.

Here ya go bud, I created a quick sample for you. This should get you started. Click the "Sign In" button and you'll see your container slide down, then go ahead and fill that container with a regular <form>.



thx for helping.


<div id="wrapper1">
                    <div class="language">
                    <b>English &nbsp;|&nbsp; Indonesia</b><br><br><br>
                    <div class="login_box">
                        Email:<input type="text" size="5"    name="judul"><br>
                        Password:<input type="password" size="5" name="judul"><br>
                        Forget Password<br><br>
                        <button type="button">Sign-in</button><br>
                        <button type="button">Create Account</button><br>
                    <div class="nav">
                        <div class="btn" id="login">Sign In</div>


/*sign-in button--------------------*/
#wrapper2 {
    border:1px solid red;

.language {
    margin: -100px 0 0 840px;

.nav {
    border:0px solid red;
    margin: 20px 0 0 750px;

.btn {
    margin:5px 0 0 5px;
    border:1px solid blue;

.login_box {
    left: 945px;
    z-index: 5;
/*end sign-in button----------------*/

This should be simple. I wonder why I cannot change the size of the input textbox. No matter how much I change the size the size appearance still remains the same. This is strange unlike what happen usually.

Hello nevermind. I find the answer regarding the textbox things. Define textbox size in on of the css might overlap my index textbox definition.

Now, how to program when someone click the background the dropdownbox disappeared ?

Thanks in advance.

Add an onBlur handler in the div containing the dropdown and hide the dropdown in it.

Also how to fix the button link:

<button type="button" class="button" onClick="document.location.href('http://localhost/www.google.com');">Create Account</button><br>

I try to click the link but the new window does not appears. Is my code correct?