SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding an LogIn image to a Form

    I'm using a php web script with a Log In Box

    I had someone redesign/recode the Log In Box, but the Submit button
    didn't work. So I added back in the old submit button, however I'd like to use the newer button image for it. I just don't know how to code it correctly. The form that currently works is this one:

    Code:
    <form action="login.php" method="post" accept-charset="UTF-8" class="middletext">
    <label><font class="font4_13">Username</font></label><span class="username"><input type="text" name="user_name_login" size="16" style="width:138px;" />
    <label><font class="font4_13">Password</font></label><span class="password"><input type="password" name="password_login" size="16" style="width:138px;" /
    <input type="submit" value="[var.lang_login_now]" class="" />
    <input type="hidden" name="submitted" value="yes" />
    <input type="hidden" name="remember_me" value="remember_me" />
    </form>
    The form that doesn't work is this one:
    Code:
    <form action="login.php" method="post" accept-charset="UTF-8" class="middletext">
    <label><font class="font4_13">Username</font></label><span class="username"><input type="text" name="user_name_login" size="16" style="width:138px;" />
    <label><font class="font4_13">Password</font></label><span class="password"><input type="password" name="password_login" size="16" style="width:138px;" />
    <a class="btn_vid" href="login.php value="[var.lang_login_now]">--></a>
    <input type="hidden" name="submitted" value="yes" />
    <input type="hidden" name="remember_me" value="remember_me" />
    </form>
    How can integrate the "btn_vid" image into the first form above so that the log in form works with the new image?

    Thanks

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,191
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    This is more of a CSS question rather then a PHP question. Could you please paste the code for the btn_vid class

  3. #3
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply. Here is the btn_vid:


    Code:
    .btn_vid { 
    width:189px;
    height:21px;
    border:0px solid #333333;
    display:block;
    background: url(images/login_btn.gif);
    background-repeat:no-repeat;
    font-size:10px;
    text-align:center;
    float:right;
    padding-right:10px;
    }
    
    .btn_vid:hover{ 
    border:0px solid #333333; 
    display:block;
    background: url(images/login_btnhov.gif);
    background-repeat:no-repeat;
    text-align:center;
    }

  4. #4
    SitePoint Addict
    Join Date
    Oct 2003
    Location
    United States
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your button doesn't work on the second one because it is not a button. IT is a link. It won't submit the form. Just apply your class to the button...

    HTML Code:
    <input type="submit" value="[var.lang_login_now]" class="btn_vid" />

  5. #5
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you, that was very helpful.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •