Changing Avatar Size In Comments With CSS
-
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 { float:right; height:32px; width:32px; padding:2px; } -
-
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 WP.com blog CSS that I saw somewhere.
-
-
- The topic ‘Changing Avatar Size In Comments With CSS’ is closed to new replies.