Need help? Check out our Support site, then


Changing Avatar Size In Comments With CSS

  1. Is it possible to change the size of the avatar in the comments section using CSS? I'm using the Sandbox-10 theme. Thanks.

  2. I just checked with Firebug on a few different themes and the size is not defined in the CSS, but in the php/html. I expect that is the same with all themes.

  3. I'm not sure about Sandbox but in my theme, the avatar size was fixed (at too small a size) and when I tried to make it larger, all it did was stretch the picture. Here's the code I used:

    .comment list li .avatar {
    	float:right;
    	height:32px;
    	width:32px;
    	padding:2px;
    }
  4. I see tsp beat me to it. But if you want to make them smaller, the code should work.

  5. @vivian
    That will work in the comments widget, but not on the comments section below the posts, which is what I though the OP was asking. Perhaps they can clarify that.

  6. And in the recent comments widget, you can set the size of the avatars down to 16x16 by editing the widget's settings.

  7. tsp - sorry, but you're wrong on this one. That code is in use on my blog right now. When I put it in originally, it enlarged the 16x16 avatar to 32x32, but as I mentioned above, it stretched the image since the avatar was hard coded in the php/html. I convinced the fine people here at WP to increase the size of the avatars in the comments section to 32x32, so I just left that code there (since it also floated my avatars to the right, instead of being on the left).

    If the OP wants a smaller avatar, that code would work (simply change the height and width).

    I actually copied that code, BTW, from another WP.com blog CSS that I saw somewhere.

  8. BTW - I just tested it at 16x16 and it correctly resized the avatar.

  9. Hmmm, Ok. I'll have to remember that.

Topic Closed

This topic has been closed to new replies.

About this Topic