Where to change post background?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnatoliyOFF
    Member
    • Jun 2015
    • 54
    • 5.2.x

    Where to change post background?

    Can't find it out. Please help to change 2 background colors indicated on a picture. Also please advice where to increase font size of yexy in post body.
    Thanks in advance.
    Oregon Fishing Forum
  • AzhriaLilu
    Senior Member
    • Aug 2003
    • 1388

    #2
    You can use:-
    Code:
    .b-post--first .b-post__body {
    background: green;}
    Changing green to whatever colour you want - for the first post in the thread.

    You can use:-

    Code:
    .b-post__body {
      background: blue;}
    To change the reply colour to blue or whatever other colour you like, but as yet I haven't found a way to make it alternate colours. I'll admit I haven't looked too deeply into it, to be sure. But, if nothing else, that'll give you a starting point.

    Obnoxious colours, I know, but it's just to show you lol

    Click image for larger version

Name:	colours.png
Views:	285
Size:	35.9 KB
ID:	4346131
    I know violence isn't the answer . . . I got it wrong on purpose
    Rep Owners - New forum for reptile owners/lovers
    sigpic

    Comment

    • AnatoliyOFF
      Member
      • Jun 2015
      • 54
      • 5.2.x

      #3
      Thanks for reply.


      Code:
      .b-post__body {
      background: blue;}
      nope, doesn't work (
      Oregon Fishing Forum

      Comment

      • AzhriaLilu
        Senior Member
        • Aug 2003
        • 1388

        #4
        Where did you put it? It needs to be in the css_additional.css template for the style you are using.

        Click image for larger version

Name:	cssadditiona.png
Views:	252
Size:	16.8 KB
ID:	4346137
        I know violence isn't the answer . . . I got it wrong on purpose
        Rep Owners - New forum for reptile owners/lovers
        sigpic

        Comment

        • Wayne Luke
          vBulletin Technical Support Lead
          • Aug 2000
          • 73979

          #5
          There are style variables for the post backgrounds.

          The left column with the user information is post_background

          The background for the starter post are thread_starter_background and thread_reply_background, respectively.

          You can even change the backgrounds for deleted and unapproved posts. All of these are in the PostRepliesAndComments stylevar group.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment

          • glennrocksvb
            Former vBulletin Developer
            • Mar 2011
            • 4011
            • 5.7.X

            #6
            The rule of thumb for style customizations is to do it first via style variables. If a style variable does not exist for an element on a page, then do it via css_additional.css template. You would want to minimize custom styles in css_additional template as much as possible when you can do it via style variables. Otherwise, you would accumulate tons of custom CSS rules over time and that would be hard to maintain.

            Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

            Comment

            • AnatoliyOFF
              Member
              • Jun 2015
              • 54
              • 5.2.x

              #7
              Originally posted by Wayne Luke
              There are style variables for the post backgrounds.

              The left column with the user information is post_background

              The background for the starter post are thread_starter_background and thread_reply_background, respectively.

              You can even change the backgrounds for deleted and unapproved posts. All of these are in the PostRepliesAndComments stylevar group.
              Thank you, Wayne Luke. It works!
              Please advise how to change font size for forum titles, subforum titles, and links and description in module blocks.
              Thanks in advance.
              Oregon Fishing Forum

              Comment

              • glennrocksvb
                Former vBulletin Developer
                • Mar 2011
                • 4011
                • 5.7.X

                #8
                This is the process I take to know how to style an element using stylevars or css_additional template.

                I need a full list of the StyleVars and all their definitions. I thought this would at least be documented. Possibly for vb4 with the same kind? While I'm wanting to layout my site, not knowing which


                Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                Comment


                • AnatoliyOFF
                  AnatoliyOFF commented
                  Editing a comment
                  I'm sorry, but it sounds too complicated for me... Can you advice like Wayne Luke did?
              • AnatoliyOFF
                Member
                • Jun 2015
                • 54
                • 5.2.x

                #9
                Glenn, for example I follow your instruction for a link (topic title) in a module box (number 3 on a picture above).

                I found that the link in a div class=b-post-sm__title ellipsis. Search in tamplate giver me 2 results:
                display_contenttype_searchwidget_Channel
                display_contenttype_searchwidget_item_header

                in display_contenttype_searchwidget_Channel
                <div class="b-post-sm__title ellipsis">
                <a href="{vb:raw url}">
                {vb:raw title}
                </a>
                </div>

                display_contenttype_searchwidget_item_header
                <div class="b-post-sm__title ellipsis">
                {vb:set qs.p, {vb:raw conversation.nodeid}}
                <vb:if condition="$postType == 'reply' OR $postType == 'comment'">
                {vb:set url, {vb:url {vb:raw conversation.starterroute}, {vb:raw conversation}, {vb:raw qs}}}
                {vb:strcat url, "#post"}
                {vb:strcat url, {vb:raw conversation.nodeid}}
                <vb:if condition="$postType == 'reply'">
                {vb:rawphrase search_module_topic_link_reply_to_x, {vb:var url}, {vb:raw conversation.startertitle}}
                <vb:else />
                {vb:rawphrase search_module_topic_link_comment_on_x, {vb:var url}, {vb:raw conversation.startertitle}}
                </vb:if>
                <vb:else />
                <a href="{vb:url {vb:raw conversation.starterroute}, {vb:raw conversation}}">{vb:raw conversation.startertitle}</a>
                </vb:if>
                </div>

                there is no conversation.startertitle Style Variable Editor. The end.
                Oregon Fishing Forum

                Comment

                • Wayne Luke
                  vBulletin Technical Support Lead
                  • Aug 2000
                  • 73979

                  #10
                  Search for each class by itself... You're looking for "b-post-sm__title". Should return results in CSS templates.
                  Translations provided by Google.

                  Wayne Luke
                  The Rabid Badger - a vBulletin Cloud demonstration site.
                  vBulletin 5 API

                  Comment


                  • AnatoliyOFF
                    AnatoliyOFF commented
                    Editing a comment
                    Guys, you are torturing me. ) I'm bad in english, I'm bad in css...
                    I put in custom this:
                    .b-post-sm__title {
                    font-size: 16px;
                    }
                    it didn't change the size of topic titles in module box...
                • glennrocksvb
                  Former vBulletin Developer
                  • Mar 2011
                  • 4011
                  • 5.7.X

                  #11
                  You may want to learn basic HTML and CSS first.




                  Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                  Comment

                  • AnatoliyOFF
                    Member
                    • Jun 2015
                    • 54
                    • 5.2.x

                    #12
                    Originally posted by Glenn Vergara
                    You may want to learn basic HTML and CSS first.

                    https://www.google.com/search?q=html...eginners&rct=j
                    No I don't. ) I'm 50 years old, I'm not planning to do html & css. I didn't touch my VB4 for years, but I had to move to VB5.
                    P.S. Is it my fault that VB out of box uses unreadably small fonts? Why not to put by defaul those sizes that you use on your own forum?
                    Oregon Fishing Forum

                    Comment

                    • AnatoliyOFF
                      Member
                      • Jun 2015
                      • 54
                      • 5.2.x

                      #13
                      I guess I should better go to a ticket system to get help...
                      Oregon Fishing Forum

                      Comment

                      • Wayne Luke
                        vBulletin Technical Support Lead
                        • Aug 2000
                        • 73979

                        #14
                        Change the body_font style variable to something between 12 and 16 pt (not px). Adjust as necessary. It will change all the fonts to be larger.

                        Any _font style variable will do just that. Change the font. Style Variables are organized in groups depending on what they affect. Modules are in the Modules groups for example.
                        Translations provided by Google.

                        Wayne Luke
                        The Rabid Badger - a vBulletin Cloud demonstration site.
                        vBulletin 5 API

                        Comment

                        • AnatoliyOFF
                          Member
                          • Jun 2015
                          • 54
                          • 5.2.x

                          #15
                          Originally posted by Wayne Luke
                          Change the body_font style variable to something between 12 and 16 pt (not px). Adjust as necessary. It will change all the fonts to be larger.

                          Any _font style variable will do just that. Change the font. Style Variables are organized in groups depending on what they affect. Modules are in the Modules groups for example.
                          Thank you!
                          Oregon Fishing Forum

                          Comment

                          Related Topics

                          Collapse

                          Working...