The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Centered profile in posts, but profile fields got messed up [phpBB3]

View previous topic View next topic Go down

Solved Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Guest on August 5th 2012, 3:47 pm

I centered the profile in posts, but the profile fields got messed up. How can I make them to be vertically on-line? Forum version is phpBB3.

I'm basically asking the same as in this thread: http://help.forumotion.com/t110380-centered-username-and-avatar, though I have a different forum version.

Here's the code I use:

Code:
.postprofile {
color: silver;
background: #202020;
border: none!important;
border-bottom-right-radius: 6px;
border-top-right-radius: 6px;
color: silver;
height: 105%;
margin-bottom: 25px!important;
padding: 5px;
position: relative;
right: 0px;
top: 5px;
text-align: center;
border-collapse: separate;
border-spacing: 2px;
}


Last edited by pAiNleSS. on August 6th 2012, 6:49 pm; edited 1 time in total

Guest
Guest


Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Ahkrir on August 5th 2012, 3:59 pm

How I did it is simply go in the template and create these div tags:
Code:
<div style="float: center!important;"> for the image </div>
[/code]
Code:
<div style="text-align: center!important;"> for the txt </div>

But since you have phpbb3 you can't edit templates so let's do it another way.
May I have your forum url? I'll provide you with css properties to only align the name and image.

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Guest on August 5th 2012, 4:24 pm

Hello, here is a link to a thread visible to guests: http://te-mafia.createatopic.com/t1-forum-rules

When viewing the thread as guest, I noticed that my username does not show up. I've earlier used a Javascript code to move username above avatar. Here's the code I'm referring to, which I assume is causing that issue:

Code:
$(function(){
    $('.postprofile dl').each(function(){
    var theBox = $(this).children('dt:first');
    var uNameX = theBox.children('strong').html()+'<br>';
    theBox.children('a').before(uNameX);
    theBox.children('strong').hide();
    });
    });

If somebody could help me with this issue as well, that'd be nice.

Guest
Guest


Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Ahkrir on August 5th 2012, 4:49 pm

Would you please remove anything you did to center the image and rank and add this code to your css:
Code:
.postprofile dt img {
float: center!important;
}

.postprofile dd font {
text-align: center!important;
float: center!important;
}

Please tell me if it worked.

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Guest on August 5th 2012, 4:55 pm

Thank you, it did! Would I be able to center the rank + rank image under the avatar as well? That would be perfect.

Guest
Guest


Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Ahkrir on August 5th 2012, 5:02 pm

Yes you could, replace
Code:
.postprofile dd font {
text-align: center!important;
float: center!important;
}
With this:
Code:
.postprofile dd font, .postprofile dd img {
text-align: center!important;
float: center!important;
}

You must know now that if you let users have custom profile stuff (like a pet image behind their posts) that those pictures will be centered too.

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Guest on August 5th 2012, 5:08 pm

Hmm, I did replace the part of the code you told me, but it did nothing Confused

Guest
Guest


Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Ahkrir on August 5th 2012, 5:13 pm

Hmm Ok.
Delete those two things from your css and add this to your css:
Code:
.postprofile dt, .postprofile dd img {
float: center!important;
text-align: center!important;
}

If that doesn't work try this:
Code:
.postprofile dt, .postprofile dd img {
float: center;
text-align: center;
position: relative;
}

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Guest on August 5th 2012, 5:23 pm

None of the codes seem to make a[ny additional] change[s] blackeye I'll check once more, to be completely sure.


Last edited by pAiNleSS. on August 5th 2012, 6:21 pm; edited 1 time in total

Guest
Guest


Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Ahkrir on August 5th 2012, 5:26 pm

Before you said they worked flawless, exept for the rank image.

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Guest on August 5th 2012, 6:19 pm

Yeah, that's correct. I meant that it didn't make additional changes other that centering username and avatar. Sorry for causing confusion.

Guest
Guest


Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Ahkrir on August 5th 2012, 7:14 pm

Did you remove any other things that cause them to center other than my codes?

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Guest on August 5th 2012, 7:43 pm

Yes, I removed "text-align: center;" from ".postprofile". When adding it again, everything gets centralised, but the profile fields become messy; just like before I made this thread.

Guest
Guest


Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Ahkrir on August 5th 2012, 8:16 pm

What do you mean by 'messy'?
Are you saying the picture and rank do get centered?

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Guest on August 5th 2012, 8:31 pm



The first is with "text-align: center;" under ".postprofile".

The second is with your code:

Code:
.postprofile dt, .postprofile dd img {
float: center;
text-align: center;
position: relative;
}

The third is without anything.


I'm trying to make it be like the second, plus centering the rank image and rank text.

Guest
Guest


Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Ahkrir on August 5th 2012, 8:43 pm

Try this:
Code:
.postprofile dt, .postprofile img {
float: center!important;
text-align: center!important;
position: relative;
}

Else try this:
Code:
.postprofile dt, .postprofile dd {
float: center!important;
text-align: center!important;
position: relative;
}

Else try this:
Code:
.postprofile > dd:first-child {
    text-align: center;
}
.postprofile dt {
  float: center!important;
}

Try the last one first please.

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Guest on August 5th 2012, 9:01 pm

The first code makes it like in the 2nd picture.

The second code makes it like in the 1st picture.

The third code makes it like in the 3rd picuture; and does nothing at all.

blackeye

Guest
Guest


Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Ahkrir on August 5th 2012, 10:31 pm

Could you try this? :
Code:
.postprofile dt, .postprofile dd:first-child, .postprofile dd img:first-child {
float: center!important;
text-align: center!important;
position: relative;
}

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Guest on August 5th 2012, 11:08 pm

It does work, but turns out the same as in the second picture. I really have no clue Sad

Edit: I've tried everything I can, but either the rank remains left-aligned, or the profile fields don't appear vertically on line.

I'm not really good at scripting, but would it be possible to move the rank and rank image with Javascript?

Edit 2: I fixed the issue another way, though thank you, Ahkrir, for your time and effort; I appreciate it!

Guest
Guest


Back to top Go down

Solved Re: Centered profile in posts, but profile fields got messed up [phpBB3]

Post by Jophy on August 8th 2012, 12:53 pm

Since this was marked solved => Topic Moved

Jophy
ForumGuru

Male Posts : 17924
Reputation : 835
Language : English
Location : Somewhere

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum