<p id="avatars"><img src="[avatar]" border="0" alt="" /></p> will display the avatar of the current logged user. Is it possible to display the avatar of the current viewed page's member ?
You should be using the below usages.
My Avatar: [cb:userfield field="avatar" user="#me" /]
Users Avatar: [cb:userfield field="avatar" user="#displayed" /]
Users Avatar or My Avatar: [cb:userfield field="avatar" user="#displayedOrMe" /]
Note "#displayed" only works when viewing a users profile. Please see the below tutorial for further substitution usage information.
www.allmysocials.com/directory/tutorials/item/233-substitution-usage