1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Icon next to username

Discussion in 'Styling and Customization Questions' started by ibaker, Dec 5, 2011.

  1. ibaker

    ibaker Well-Known Member

    I am having trouble placing an icon next to the username in the "Staff Online Now" box...no matter what I do it is placing the icon under the username and not next to it.

    This is my code:

    Code:
    <xen:username user="$user" rich="true" />
     
    <a href="javascript:X('{$user.username}')"><img src="../images/X.png "></a>
     
    <div class="userTitle">{xen:helper userTitle, $user}</div>
    
    This is what I end up with:
    img1.jpg
    I can't find what class it is using or what is directing the img to be on the next line instead of nest to the username...any suggestions?...Thanks
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Use float or span.
     
  3. optrex

    optrex Active Member

    dont worry, brogan suggestion better
     
  4. ibaker

    ibaker Well-Known Member

    Thanks Brogan, I tried span but that didn't work:
    Code:
    <span>
        <xen:username user="$user" rich="true" />
        <a href="javascript:X('{$user.username}')"><img src="../images/X.png "></a>
    </span>
    
     
  5. ibaker

    ibaker Well-Known Member

    Tried float:
    This placed the icon on the left of the username:
    Code:
    <span style="float:left;">
        <a href="javascript:X('{$user.username}')"><img src="../images/X.png "></a>
    </span>
    <xen:username user="$user" rich="true" />
    
    And have tried other variants to get it to display on the right of the username but with no luck
     

Share This Page