Changing Avatar Size In Comments With CSS

  • Author
  • #177735


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


    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.



    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 {



    I see tsp beat me to it. But if you want to make them smaller, the code should work.


    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.


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



    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 16×16 avatar to 32×32, 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 32×32, 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 blog CSS that I saw somewhere.



    BTW – I just tested it at 16×16 and it correctly resized the avatar.


    Hmmm, Ok. I’ll have to remember that.

The topic ‘Changing Avatar Size In Comments With CSS’ is closed to new replies.