Support Forum

Widget recent topic avatar float left

TH Thibaud
Thibaud
Member

Hello,

I’m trying to set the avatar image on the recent topic widget to “float: left;”

Just right click on any avatar on the widget and set “float:left;”, it is much better like that no ?

http://wp-infinity.com/

How can I do that, I can’t find the class for thoses widget’s avatars.

 

Also, how can I change the defaut avatar ?

Thanks a lot

 

 

 

11 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

The avatar is given a class of ‘spAvatar’.

If you are using the actual recent posts widget then you might want to use:

.widget-wrapper .spAvatar

to limit the rule top only the widget use.

TH Thibaud
Thibaud
Member

I tried to add this :

 

.widget-wrapper .spAvatar {

float: left:

}

 

But it doesn’t work, do you know what’s wrong ?

YS Yellow Swordfish
Yellow Swordfish
Member

Where did you add it? Don’t forget that you will need to add this to your WP theme stylesheet…

TH Thibaud
Thibaud
Member

Added (but now removed) to my theme custom css field like every other simple press working custom css..

Lets say at the end of my theme’s style.css file..

YS Yellow Swordfish
Yellow Swordfish
Member

Perhaps your WP theme doesn’t do the widget-wrapper class?

The browser console will tell you what CSS is being applied if you load it up and look at the avatar element. I just loaded the page you linked to but there are no avatars being shown at all so I can’t interrogate them…

YS Yellow Swordfish
Yellow Swordfish
Member

Looks like your theme changes the widget classes – if indeed it is the widget you are using and not the template tag version.

either way I would try:

#spRecentPostsTag .spAvatar { }

which should do it. If not again – you can use your browser console to interrogate the CSS being applied. This is the best tool you gave available for this sort of thing and allows you to change CSS on the fly to see the results immediately.

TH Thibaud
Thibaud
Member

Yes that’s the one, working like a charm, thank you

I can’t find the option where to change the defaut avatar, I could simply replace the original image but i’m sure theire should be a setting in the dashboard for that isn’t it ? 

 

(sorry for multiple questions in topic)

YS Yellow Swordfish
Yellow Swordfish
Member

No – just replace the default image(s) and make sure they have the same file type and file name.