0

Hello,

I am trying to make the login button thinner. Like a clickable image. Is it possible?

This is the code that I have (below). The result is a thick clickable button. Is it possible to make it a thin image - not thick (I do not want to see the button border).

index.php

<div id="banner-background">
<div style="margin: 118px 0 0 310px; position: absolute; z-index: 3;">
<form action="login.php" method="POST">
<input type="text" class="form" name="username"><br>
<input type="password" class="form2" name="password"></div>
<input type="submit" class="login" name="submit" value=""></input></div>
<div style="margin: -235px 0 0 850px;"><a href="create_account.php">Create an Account</a><br><a href="forget_password.php">Forgot Password</a></div>
<div style="margin: 20px 0 0 630px;"><input type="checkbox" name="keeplogin" value="Keep me logged in">Keep me logged in<br></div>
</form>

Edited by diafol: Wrong forum again davy. Please!

4
Contributors
4
Replies
25
Views
2 Years
Discussion Span
Last Post by veedeoo
0

<input type="image" src="submit.gif" alt="Submit" width="48" height="28"> that should work

0

It is always a good idea to do your styling in a CSS file, as otherwise it clutters up your code (and search engines hate it).

As @edbr says, just adjust the height of the image to squash it a bit thinner.

(I do not want to see the button border).

Is this part of the image? If so, you need to do your image again and remove it. If not, then remove any CSS that might cause this.

0

Hey, I try this:

index.php

<div id="banner-background">
<div style="margin: 118px 0 0 310px; position: absolute; z-index: 3;">
<form action="login.php" method="POST">
<input type="text" class="form" name="username"><br>
<input type="password" class="form2" name="password"></div>
<!--<input type="submit" class="login" name="submit" value=""></input>-->
<input type="image" src="images/login.jpg" alt="submit">
</div>
<div style="margin: -235px 0 0 850px;"><a href="create_account.php">Create an Account</a><br><a href="forget_password.php">Forgot Password</a></div>
<div style="margin: 20px 0 0 630px;"><input type="checkbox" name="keeplogin" value="Keep me logged in">Keep me logged in<br></div>
</form>

If I use this code, how to pass the following condition since the input type is image not submit:

login.php

if (isset($_POST['submit'])) {

/* the files */

Edited by davy_yg

1

two ways you can do what you wanted.

first, can do it with javascript.
second, add this above your image submit button

<input type="hidden" name="submit" />
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.