![]() |
Resizing avatars in postbit?
Hey guys, I'm making a mobile skin and would like to display the poster's avatar next to their name in postbit_legacy. I added the bit of code to do this, but since it's a mobile skin, the avatars are way too big.
How would I go about to make them smaller, just for that skin? Don't know exactly what size I would want just yet, guess it will take some testing, but they have to definitely be smaller. Any help would be awesome, thanks! :) --------------- Added [DATE]1522894992[/DATE] at [TIME]1522894992[/TIME] --------------- I actually figured it out.. somewhat. This is my code: Code:
<if condition="$show['avatar']"> Only thing is, some of the avatars come out as rectangles (tall and thin). Is there a way to make them perfectly square instead of rectangle? |
Anyone? It seems with the code above, the height changes to 40px, but the width can vary.
Any way around this? Thanks! |
Try using the "style" attribute instead to introduce inline CSS...like:
HTML Code:
<img src="$post[avatarurl] style="height: 40px; width: 40px;" <phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /> |
Hmm, for some reason that made the avatars bigger, and some of them are still rectangles rather than squares.
|
You must have CSS elsewhere taking precedence. Try:
HTML Code:
<img src="$post[avatarurl] style="height: 40px !important; width: 40px; !important" <phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /> |
That did the same. :(
|
All times are GMT. The time now is 10:23 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|