Search code examples
htmlcssmybb

Troubles with Positioning in CSS


so recently I had opened up my forum and am currently configuring the theme, but have ran into some trouble. On posts, there are stats displayed to the right, but they're too close together and display obscurely. After awhile of research such as positioning, containers, etc., I still haven't been able to find my answer, and still desperately need help. Here's a screenshot of what I'm talking about:

Screenshot 1

This is the CSS for the statistics:

    .post .post_author div.author_statistics {
         float: right;
         font-size: 11px;
         padding: 3px 10px 3px 5px;
         padding-left: 50px;
         color: #666;
         line-height: 1.3
    }

If you need any extra information, let me know and I can provide it. Thanks in advance for any help!

EDIT: Here's a part of the HTML for the stats.

    <span style="font-size:13px;">
    <div align="center">
    <div class="float_left">Posts:</div> <div class="float_right"> 13</div><br>
    <div class="float_left">Threads:</div> <div class="float_right"> 1</div><br>
    <div class="float_left">Joined:</div> <div class="float_right"> Oct 2015</div>


    <br><div class="float_left">Reputation:</div> <div class="float_right">
    <a href="reputation.php?uid=2"><strong class="reputation_positive">2</strong></a>
    <!-- end: postbit_reputation_formatted_link --></div>
    <!-- end: postbit_reputation --></div>
    <!-- end: postbit_author_user -->
    </span>

Solution

  • Try this one

    .post .post_author div.author_statistics {
         margin-right: 50px;
         float: right;
         font-size: 11px;
         padding: 3px 10px 3px 5px;
         padding-left: 50px;
         color: #666;
         line-height: 1.3;
    }
    

    You just need to increase or decrease the margin-right value