• Resolved nigelryans

    (@nigelryans)


    Hello, I am wondering how to properly add padding to the topic/post/reply author box via custom CSS. Additionally, I need it so that the poster’s username and role remain centered.

    I tried to do it with the below code, but this only adding left padding for some reason, and left the username and role off-centered.

    .bbp-reply-author {
    padding-left: 20px;
    padding-right: 20px;
    }

    Any help would be great. Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Robin W

    (@robin-w)

    that can be theme specific, so a link to an example would be good

    If you site is public, then post a link here

    If the site is private, then contact me via my website

    http://www.rewweb.co.uk

    Thread Starter nigelryans

    (@nigelryans)

    Thank you for the quick response.

    Here is a link to the forum topic: https://www.jotaku.net/forums/topic/forum-created/

    Plugin Author Robin W

    (@robin-w)

    ok, two things needed

    somewhere in your existing css you have

    #bbpress-forums div.bbp-forum-author, #bbpress-forums div.bbp-topic-author, #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-search-author {
    	width: 80px !important;
    }

    This is stopping the right hand padding doing anything as the width is fixed.

    your css is minified so I can’t absolutely confirm, but I think it is in bbpress.css

    so you’ll need to add a later rule – if your theme has a custom css area – then try this in there as a first go

    #bbpress-forums div.bbp-forum-author, #bbpress-forums div.bbp-topic-author, #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-search-author {
    	margin-left : 20px ;
    	width: 100px !important;
    	
    }

    then also add

    bbpress-forums div.bbp-forum-author a.bbp-author-name, #bbpress-forums div.bbp-topic-author a.bbp-author-name, #bbpress-forums div.bbp-reply-author a.bbp-author-name, #bbpress-forums div.bbp-search-author a.bbp-author-name {
    	margin-left : 20px ;
    }

    which should also carry the name through

    come back if you need further help

    • This reply was modified 8 years, 4 months ago by Robin W.
    Thread Starter nigelryans

    (@nigelryans)

    Thank you for the help!

    #bbpress-forums div.bbp-forum-author, #bbpress-forums div.bbp-topic-author, #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-search-author {
    width: 80px !important;
    }

    The above code was in my themes style-bbpress.css

    Simply removing that code from the .css file gave the author box proper padding on both sides without having to add any additional code.

    #bbpress-forums div.bbp-forum-author a.bbp-author-name,
    #bbpress-forums div.bbp-topic-author a.bbp-author-name,
    #bbpress-forums div.bbp-reply-author a.bbp-author-name,
    #bbpress-forums div.bbp-search-author a.bbp-author-name {
    font-family: ‘Open Sans’, arial, sans-serif;
    font-weight: 600;
    line-height: 16px;
    margin: 0;
    width: 80px;
    word-wrap: break-word;

    Removing “width: 80px;” from the above code restored author name back to center.

    Again, thank you for your help! The problem has been solved.

    Plugin Author Robin W

    (@robin-w)

    no problem, glad to have helped.

    If you are not using a child theme, then keep a note of the changes you have made, as any theme update may well revert those changes.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Adding Padding To Topic/Reply Author’ is closed to new replies.