MyBB Community Forums

Full Version: Welcomeblock/Avatar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Okay, I've been trying for the longest time to get this right and seem to always run into little discrepancies here and there with image stretching on avatars and all kinds of other frustrating caveats and wonder if anyone can assist in getting me to pull this off.

Basically what I'm looking to accomplish (and have nearly did so) is this:
http://i.imgur.com/XHTNH.png

As you can see on my forum HERE I'm nearly there yet soooooooo very far away. That avatar (which is longer than it is wide) is keeping the correct aspect ratio (which I want) but is leaving a huge gap between the welcome block. If I change my avatar to that of a wider one the aspect ratio is still correct and fine and is ALMOST at the appropriate distance between the welcome block (example HERE).

If it's at all possible to clean this up and have something that doesn't looked half-assed or gimped to hell and back I would appreciate it Big Grin This has probably been the one thing that has frustrated me to no end as I'm no HTML/CSS expert by any stretch of the imagination.

My forum link is HERE if you'd like to take a look.

Thanks! Smile
<img src="{$mybb->user['avatar']}" alt="Avatar" width="90px"; height="90px"; style="margin-top: 0px;">

Is your code something like this?
(2011-06-16, 01:40 AM)Solidus Wrote: [ -> ]
<img src="{$mybb->user['avatar']}" alt="Avatar" width="90px"; height="90px"; style="margin-top: 0px;">

Is your code something like this?

It's specifically this:
<div id="userbox_panel" style="margin-right: 175px"><span style="float:right;"><a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a> | <a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a><a href="{$mybb->settings['bburl']}/private.php"><br />{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}</span><br />
<span style="float:right;">({$modcplink}{$admincplink} &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a>)</span><br />
<span class="links">{$headerwarnlevel}</span></div>

<div id="userbox"><a href="{$mybb->settings['bburl']}/usercp.php"><img src="{$mybb->user['avatar']}" alt="" style="height: 100px;" /></a></div>

I use this CSS to style them:

#userbox {
float: right;
margin-top: -140px;
margin-right: 15px;
border: 1px solid #303030;
border-radius: 8px 8px 8px 8px;
box-shadow: 2px 1px 8px #AAAAAA !important;
background-image: url(images/bg.png);
display: table;
padding: 16px;
position: relative;
z-index: 10000;
}

#userbox_panel {
float: right;
margin-top: -115px;
margin-right: 215px;
border: 1px solid #303030;
border-radius: 8px 8px 8px 8px;
box-shadow: 2px 1px 8px #AAAAAA !important;
background-image: url(images/bg.png);
display: table;
padding: 16px;
position: relative;
z-index: 10000;
}
bump Smile
bump Sad
bump Smile
The problem is the welcomeblock has a static margin to it, so it won't move according to the avatar's width. Can you, once again, give me a user test-account?
(2011-06-23, 02:46 PM)faviouz Wrote: [ -> ]The problem is the welcomeblock has a static margin to it, so it won't move according to the avatar's width. Can you, once again, give me a user test-account?

Sure thing, I sent you a PM.
bump Sad
bump Smile
Pages: 1 2