WordPress.org

Ready to get started?Download WordPress

Forums

Custom Login
[resolved] how to get HTML background image centered? (5 posts)

  1. iramaura
    Member
    Posted 2 years ago #

    hi Frosty,

    I've got a 1000x667px resolution image as a HTML background to my WP login screen, but do not know how to get it centered:

    http://natidemo.aimaea.com/wp-admin

    please help!

    many thanks in advance!

    http://wordpress.org/extend/plugins/custom-login/

  2. iramaura
    Member
    Posted 2 years ago #

    hi again,

    I've resolved it...

    in the custom-login.css.php file there are the settings for html background:

    /* html background */
    html {
    background: <?php if ( custom_login_get_setting( 'html_background_color' ) != '' ) echo custom_login_get_setting( 'html_background_color' ); if ( custom_login_get_setting( 'html_background_url' ) != '' ) { ?> url( '<?php echo custom_login_get_setting( 'html_background_url' ); ?>' ) left top <?php echo custom_login_get_setting( 'html_background_repeat' ); } ?> !important;

    }

    I've just changed the "left top" to "center top". works fine now!

    thanks for the plugin. cheers!
    ...

  3. Austin Passy
    Member
    Plugin Author

    Posted 2 years ago #

    You really should add that CSS to the custom CSS area, else your modification will get overwritten in the next update.

    try:

    html { background-postion: center top !important }
  4. iramaura
    Member
    Posted 2 years ago #

    hi there,

    yes, You're absolutely right, though than I have to remove the very same attribute from at the very of the code shown above.
    I seems that together applied won't work, but I'm not an expert.

    anyway, I've added an opacity to the login box:

    #login form {
    opacity:0.8;
    filter:alpha(opacity=80);
    }

    the admin login now looks great!

    many thanks for You kind help! keep on the good work!

    cheers!

  5. mbloom
    Member
    Posted 2 years ago #

    I have tried adding

    html { background-postion: center top !important }

    to the custom css field but it isn't working for me. However, if I go into the custom-login.css.php file and change 'left top' to 'center top' it'll work then. Any idea of what I am doing wrong?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic