• Resolved vad111

    (@vad111)


    I Hello there,
    I entered log-in code into sidebar.php
    here is the code:

    <li id=”login”>
    <?php
    global $user_ID, $user_identity;
    get_currentuserinfo();
    if (!$user_ID):
    ?>
    <h2><?php _e(‘Login’); ?></h2>
    <form name=”loginform” id=”loginform” action=”<?php echo get_settings(‘siteurl’); ?>/wp-login.php” method=”post”>
    <div><label><?php _e(‘Login’) ?>:
    <input type=”text” name=”log” id=”log” value=”” size=”20″ tabindex=”7″ /></label>
    <label><?php _e(‘Password’) ?>:
    <input type=”password” name=”pwd” id=”pwd” value=”” size=”20″ tabindex=”8″ /></label>
    <label><input type=”checkbox” name=”rememberme” value=”forever” tabindex=”9″ /> <?php _e(“Remember me”); ?></label>
    <input type=”submit” name=”submit” value=”<?php _e(‘Login’); ?> »” tabindex=”10″ />
    <?php wp_register(”, ”); ?>
    <input type=”hidden” name=”redirect_to” value=”<?php echo $_SERVER[‘REQUEST_URI’]; ?>”/></div>
    </form>
    <?php
    else:
    ?>
    <h2><?php echo $user_identity; ?></h2>

    <?php
    endif;
    ?>

    But if you look on it here https://www.plentyofluck.com/
    it is not centered and it looks like this form moved to the left a little bit.
    What should I do to correct it or center it

    Thanks,
    Vad

Viewing 7 replies - 1 through 7 (of 7 total)
  • jebaloo

    (@jebaloo)

    I don’t know much, but have you tried using simple html centre tags?

    Thread Starter vad111

    (@vad111)

    I have no knowledge in HTML or PHP,
    If there is no straighten it out may be there is some other plugin or code for “log-in form” ?
    Please any one help!!!

    dalebert77

    (@dalebert77)

    Jebaloo is correct – you could just use the center html tag – you would place a <center> before the <form name… code and then close the tag using </center> after the </form> tag – but I don’t think you really want to do that.

    Your sidebar is much wider than it looks because of the tree gif hang over – so centering your login form will look more like you shoved it over the to right.

    It would make more sense to edit your CSS.

    Thread Starter vad111

    (@vad111)

    Hi dalebert77,
    ok what should I edit in CSS, i have no idea?!
    I tried to edit to CSS this:

    #login {margin:0 auto 0 auto;width:250px;}

    it fixes all except the title! The title (login) moves to the right. In that case whole form with the title moves to the right so the title (login) not on the same line with other titles. That is why I think that something should be changed in the “login” code itself.
    Any other ideas?
    Thanks,
    Vad

    Thread Starter vad111

    (@vad111)

    Ok I incerted <center> and </center> before <div> and after </div> in to the code in the sidebar.php and now this is what I got:
    https://www.plentyofluck.com/

    I think it is moved too much to the right, is there some other thing that I can do to move it a little bit to the left?
    Thanks,
    Vad

    Thread Starter vad111

    (@vad111)

    Please any one out there!?
    Maybe there is some other log-in plugin similar to this?
    Vad

    Thread Starter vad111

    (@vad111)

    Ok I started to play with it and resulved it by myself.
    I added
    <ul> and </ul>
    before and after “form”

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Log-in form in the side bar is not centered’ is closed to new replies.