Warning: <body> CSS change necessary for 5.4.3!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • StephenKay
    Senior Member
    • Apr 2003
    • 437

    Warning: <body> CSS change necessary for 5.4.3!

    I upgraded a few days ago from 5.4.1 to 5.4.3. Initially, everything seemed fine. Today I noticed that the box at the bottom where it normally says "Write Something..." (for replying) no longer showed that, but instead was being filled with my main site background image.

    It turns out that I have, in my css_additional.css file, something like this:

    HTML Code:
    body {
           background-color: #5db8c6;
           background-image: url("/images/background-hawks4.jpg");
           background-repeat: no-repeat;
           background-origin: content-box;
           background-attachment: fixed;
           background-size: cover;
    }

    For some reason, this worked perfectly fine in 5.4.1. In 5.4.3, for some reason, the iframe that is used for the "Write Something" reply area, which also has a body tag, is taking on these same css attributes. I have a backup copy of 5.4.1, and I can verify by inspecting elements that this was not the case previously.

    In any case, the fix seems to be easy. Change the "body" tag to #vb-page-body, i.e.:

    HTML Code:
    #vb-page-body {
           background-color: #5db8c6;
           background-image: url("/images/background-hawks4.jpg");
           background-repeat: no-repeat;
           background-origin: content-box;
           background-attachment: fixed;
           background-size: cover;
    }
    Click image for larger version

Name:	bodybug.jpg
Views:	60
Size:	64.3 KB
ID:	4398745
  • glennrocksvb
    Former vBulletin Developer
    • Mar 2011
    • 4011
    • 5.7.X

    #2
    This issue started in 5.4.2. Starting that version, the css_additional.css template started to be included in ckeditor iframes. This causes custom css using just "body" selector to be also applied to ckeditor iframe body tag. Ckeditor iframes are used on multiple places in the editor - the editor box itself, the font family and font size dropdowns, etc.

    This was reported to me on my site and I offered a solution

    https://vbmods.rocks/forum/vbulletin...b5-4-2-upgrade

    Our solutions are different but both should work.

    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

    • StephenKay
      Senior Member
      • Apr 2003
      • 437

      #3
      Thanks, Glenn - yours may be better if people are using the body tag to do something other than play with the background. That's all I use it for.

      Comment

      Related Topics

      Collapse

      Working...