vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   How I can center avatar (https://vborg.vbsupport.ru/showthread.php?t=322517)

SilverBoy 05-03-2016 05:47 PM

How I can center avatar
 
Hi

I want to put the avatar of the user in the center of the block in postbit legacy template, I tried every thing I can think of but without luck, could you please help me in doing this thing?

MarkFL 05-03-2016 06:51 PM

Try adding the following CSS selector to your "additional.css" template:

HTML Code:

.postuseravatar {
        text-align: center !important;
        width: 100% !important;
}


SilverBoy 05-03-2016 07:31 PM

Thank you it works great :)

TheLastSuperman 05-05-2016 01:42 AM

Note: Overkill if only wanting avatar centered however... You could center all of it, some prefer all of the userinfo centered (within reason) here is a snippet of code that will do so (most of which I copied from a post by Lynne loooooong ago other additions over time).

Code:

/* center avatar, username, title, rank, userinfo_extra, postbit_reputation, imlinks */
.postbitlegacy .userinfo .username_container, .postbitlegacy .userinfo .rank, .postbitlegacy .userinfo .usertitle .imlinks {
        text-align:center;
}
.postbitlegacy .userinfo .postuseravatar, .postbitlegacy .userinfo .postuseravatar img {
        float:none;
        text-align:center;
}
.postbitlegacy .userinfo .usertitle {
        display: block;
        float:none;
        text-align:center;
        clear: both;
}
.postbitlegacy .userinfo .userinfo_extra {
        text-align:center;
        clear: both;
}
.postbit_reputation {
        float:none;
        text-align:center;
}
.postbitlegacy .imlinks  {
        float:none;
        text-align:center;
}
.postbitlegacy .after_content {
        clear:right !important;
}

I can't recall if the items listed like location would look wonky, if so you could try also adding:
Code:

.postbitlegacy .userinfo .userinfo_extra dl {
        text-align:center;
}

.postbitlegacy .userinfo .userinfo_extra dt {
        float:left;
        text-align:right;
}

.postbitlegacy .userinfo .userinfo_extra dd {
        float:left;
        text-align:center;
}

^ I had the bottom code commented out using /* .cssdefinition {code etc} */ so can't recall why in my one test style I did that, might not need to add the bottom code but there for reference.


All times are GMT. The time now is 08:50 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
  • Page Generation 0.00985 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete