News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[SMF 2.0.8] Center info in profile

Started by Rain Forest, August 12, 2014, 11:59:12 AM

Previous topic - Next topic

Rain Forest

In profile.template.php I've tried to make the members info centered by replaying

<div class="username">

by

<div class="username" style="text-align: center;">

but that didn't work out very well since only the 'username and membergroup' will center.



<div id="basicinfo">
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="content flow_auto">
<div class="username"><h4>', $context['member']['name'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4></div>
', $context['member']['avatar']['image'], '
<ul class="reset">';



Please help :)

kat

As that's a custom theme, this may not work.

In truth, I'm not coder. So, this might be total rubbish. ;)

So, keep a copy of the file, before you edit it, in case I've goofed.

Would this do it?

<div style="text-align: center;">
<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $txt['showPosts'], '</a><br />
<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>
</div>


ARG01

Imo, centering is best when done in index.css. See this post.
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

kat


Rain Forest

Nothing happenend with that code, @K

Also adding this to index.css won't make a change..

.postarea,
.moderatorbar                           { margin: 10px 0 0 16em; }
.postarea div.flow_hidden               { width: 100%; }
.moderatorbar                           { clear: right; }
/* poster details and list of items */
.poster h4,
.poster ul                              {
                                            padding: 0;
                                            margin: 0 1em 0 1.5em;
                                        }
.poster h4                              {
                                            margin: 0.2em 0 0.4em 0;
                                            font-size: 100%;
                                        }
.poster h4,
.poster h4 a                            { }
.poster ul ul                           {
                                            margin: 0.3em 0 0 0;
                                            padding: 0;
                                        }
.poster ul ul li                        { display: inline; }
.poster li.stars,
.poster li.avatar,
.poster li.blurb,
li.postcount,
li.im_icons ul                          { margin-top: 0.5em; }
.poster li.avatar                       { overflow: hidden; }
.poster li.warning                      {
                                            line-height: 1.2em;
                                            padding-top: 1em;
                                        }
.poster li.warning a img                {
                                            vertical-align: bottom;
                                            padding: 0 0.2em;
                                        }
.messageicon                            {
                                            float: left;
                                            margin: 0 0.5em 0 0;
                                        }
.messageicon img                        { padding: 6px 3px; }
.keyinfo                                {
                                            float: left;
                                            width: 50%;
                                        }
.modifybutton                           {
                                            clear: right;
                                            float: right;
                                            margin: 6px 20px 10px 0;
                                            text-align: right;
                                            font: bold 0.85em arial, sans-serif;
                                            color: #334466;
                                        }

ARG01

You don't simply add it to index.css because you still have your original CSS overriding the new code. Just compare my code with yours and make changes as you move along. As the posts states, "Just play around with it."   ;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Advertisement: