MyBB Community Forums

Full Version: Postbit padding issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey.

So. I'm trying to style my postbit so that the lang-texts goes left and the values goes right. But for some reasons padding/margin-right doesn't work. Only way for me to move the values to the right is using padding-left, which doesn't align them on the same position as some has more newpoints currency than others, some has more posts etc. Why won't it work and how can I fix it?

This is what I mean:

[Image: M3JObCl.png]

And here's one example of the code:

<span style="padding-left: 25px;">Posts</span><span style="padding-left: 56%;">{$post['postnum']}</span><br />
I used only 3 classes.

CSS

Quote:.pwidth {
width: 120px;
margin: 0 auto;
}

.pleft {
float: left;
}

.pright {
float: right;
}

HTML

postbit_author_user

<div class="pwidth">
<span class="pleft">{$lang->postbit_posts}</span><span class="pright">{$post['postnum']}</span><br />
<span class="pleft">{$lang->postbit_joined}</span><span class="pright">{$post['userregdate']}</span>
{$post['replink']}
{$post['warninglevel']}
</div>

postbit_reputation

<br /><span class="pleft">{$lang->postbit_reputation}</span><span class="pright">{$post['userreputation']}</span>

postbit_warninglevel

<br /><span class="pleft">{$lang->postbit_warning_level}</span><span class="pright"><a href="{$warning_link}">{$warning_level}</a></span>

You can adjust the space between each element by the "pwidth" class, change the width from 120px to up and you will have more space.

Greetings.
(2014-08-05, 02:55 PM)eNvy Wrote: [ -> ]I used only 3 classes.

-

You can adjust the space between each element by the "pwidth" class, change the width from 120px to up and you will have more space.

Greetings.

:|

[Image: BWvFHaN.png]
Give me your forum link please, so I can check that.
Add this:

.postbit_width {
margin: 0 auto;
}

that will center the information in the table.
(2014-08-05, 07:13 PM)eNvy Wrote: [ -> ]Add this:

.postbit_width {
margin: 0 auto;
}

that will center the information in the table.

Yeah, it centers everything thus making that mess I showed on the picture D:
Nope, I tested on your forum and it center all normally... you can always change the width of the container.
(2014-08-05, 11:36 PM)eNvy Wrote: [ -> ]Nope, I tested on your forum and it center all normally... you can always change the width of the container.

Hmm you're right. Though, there's still something wrong. Some of them are on different lines.

[Image: 51UylsT.png]
(2014-08-06, 07:05 AM)Neovo Wrote: [ -> ]Hmm you're right. Though, there's still something wrong. Some of them are on different lines.

Did you change the postbit and warning templates like eNvy mentioned?
Pages: 1 2