WordPress.org

Ready to get started?Download WordPress

Forums

Author Avatars List
[resolved] Widget Text alignment and padding (5 posts)

  1. jonastep
    Member
    Posted 4 years ago #

    I'm relatively new at this and horrible with css code. In the sidebar widget, how do I change the alignment of the text and spacing (padding?) from the avatar? I'd like to try and get the name centered on the right side of the picture and spaced away from it a little.

    My page is here: http://www.defenseofmedicine.com

    http://wordpress.org/extend/plugins/author-avatars/

  2. Ben
    Member
    Plugin Author

    Posted 4 years ago #

    Add the following bits to your theme's style.css and adjust the values as needed; vertical centering is hard to do, but you can use bottom padding on the .name rule to move the name upwards...

    html .multiwidget_author_avatars .author-list .user .name {
    	        padding: 0 0 5px 10px;
    	        /* padding: top right bottom left; */
    	}

    Hope this helps...

  3. jonastep
    Member
    Posted 4 years ago #

    Unfortunately this didn't do anything. I added the following to the bottom of my style.css file of my theme and it didn't change anything in the sidebar widget.

    /*** AUTHOR AVATARS LIST ***/
    html .multiwidget_author_avatars .author-list .user .name {
    	        padding: 0 10px 15px 10px;
    	        /* padding: top right bottom left; */
    	}

    Any other suggestions?

  4. Ben
    Member
    Plugin Author

    Posted 4 years ago #

    Ah, it seems that the plugin's widget styles aren't applied at all, because the widget block in which the avatars reside has a non-standard css class name (block-multiwidget_author_avatars instead of just multiwidget_author_avatars). I think you have two options:

    1. find the place in your theme (or plugin?) where the css class names of widgets get renamed, and change it back to the defaults (i.e. no block prepended to class names)
    2. copy all of the plugin's css rules (from [aa-plugin]/css/widget.css) to your theme and replace all instances of multiwidget_author_avatars with block-multiwidget_author_avatars...

    Either way should work, but if you choose the later you will obviously have to maintain that bit of css (and any possible changes in the plugin) yourself...

  5. jonastep
    Member
    Posted 4 years ago #

    Worked. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic