Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 149846

input type password is immovable

$
0
0

I have this code and the 1st input won't ever move whatever I do the only thing that made it move was float:right; but I don't want it to be like this I even created this div->P so maybe it would move. Has anyone encountered this problem before?

Is it possibly interfearing with my js? That's the only thing I can think of rn

                .inner {
                    display:inline-block;
                    margin-right:500px;
                }

                .pswd {
                    display:inline-block;
                    margin-right:500px;           
                }

          </style>
        </head>
        <body>
            <div class="P">
                <input class="inner" type="password" id="pswd">
                <input class="inner" type="button" value="Submit" onclick="checkPswd();"/>
            </div>

        <script type="text/javascript">
            function checkPswd() {
                var confirmPassword = "admin";
                var password = document.getElementById("pswd").value;
                if (password == confirmPassword) {
                     window.location="A.html";
                }
                else{
                    alert("Password incorrect.");
                }
            }
        </script>

Viewing all articles
Browse latest Browse all 149846

Trending Articles