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

  1. iramaura
    Posted 4 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:


    please help!

    many thanks in advance!


  2. iramaura
    Posted 4 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
    Plugin Author

    Posted 4 years ago #

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


    html { background-postion: center top !important }
  4. iramaura
    Posted 4 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 {

    the admin login now looks great!

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


  5. mbloom
    Posted 4 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

  • Custom Login
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic