Skip to content

[NODEBB] Wallpapers BUG on Firefox Mobile ?

Solved Customisation
  • Hello @phenomlab

    My wallpapers works great on Chrome, Vivaldi, Brave on mobile but no on firefox.
    If I don’t scroll the page, wallpaper is OK. If i scroll on a category with lot of topics, i have a black color at the bottom of the sreeen after the wallpeper.

    ONLY on FIREFOX

    I have this code :

    /* Smartphone */
    @media (min-width: 320px) {
            body {
            background: url(https://domain.com/assets/customcss/backgrounds/default/default_01.png) no-repeat center center fixed; /*Background01*/
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
            background-color: transparent !important; 
        }
    }
    

    -moz-background-size: cover is declared for Gecho but I have this :

    d9b8067c-4943-47e7-83b7-73406fcc4524-image.png

    Thanks 😉

  • @phenomlab

    I have fixed the bug with a body: after like this :

    /* Smartphone */
    @media (min-width: 320px) {
            body {
            background: url(https://XXXX.XXX/assets/customcss/backgrounds/default/default_01.png) no-repeat center center scroll; /*Background01*/
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
            background-color: transparent !important; 
        }
        
        body:after{
          content:"";
          position:fixed; /* stretch a fixed position to the whole screen */
          top:0;
          height:100vh; /* fix for mobile browser address bar appearing disappearing */
          left:0;
          right:0;
          z-index:-1; /* needed to keep in the background */
          background: url(https://XXXX.XXXX/assets/customcss/backgrounds/default/default_01.png) center center;
          -webkit-background-size: cover;
          -moz-background-size: cover;
          -o-background-size: cover;
          background-size: cover;
          background-color: transparent !important; 
    }  
    }
    

    But I don’t know if this is a good solution.

    What do you think ?

    Could it be simpler than that?

  • @downpw This looks extremely complex. I think you should be looking at background-repeat - see https://www.w3schools.com/CSSref/pr_background-repeat.asp

  • I will test soon and let you know if it’s ok

    like this ?

    /* Smartphone */
    @media (min-width: 320px) {
            body {
            background-image: url(https://XXXX.XXX/assets/customcss/backgrounds/default/default_01.png) 
            background-repeat: repeat-y
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
            background-color: transparent !important; 
        }
    }
    
  • @downpw yes, that should work, but you probably need to experiment to get the best results.

  • @phenomlab

    Thats works but It’s really not very pretty 😞

    The code I have find on the web is complex, but it do the job perfectly.

    The result is exactly the same on Chrome based browsers and Firefox Mobile.
    and that’s what I’m looking for because I have a lot of FF users on mobile.

    I don’t understand why Firefox Mobile doesn’t interpret this code the same way.

    It is very frustrating 😞

    If you have better for the same result, I’m a taker of course 🙂

  • @downpw this is very odd. Firefox uses the Gecko engine and Chrome uses WebKit. They aren’t too far apart in terms of standards, so it should be the same across browsers.

  • the code which is complex does the job.

    He remove the black bar without repeating the wallpaper.

    I had trouble finding this code.

    A lot of people have the same problem apparently under Firefox Mobile app. On firefox desktop app, it’s OK.

    This is really a specificity of the mobile version.
    Maybe on the renderer.

  • @downpw I’m inclined to agree with this. There isn’t much else you can do, and provided it works with no odd looking artefacts in other browsers, then ok. The :before and :after are pseudo classes and very well supported across all browsers (except perhaps Internet Exploder, but who uses that these days ?)

  • phenomlabundefined phenomlab has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

  • Where are widgets stored?

    Solved Configure
    3
    1 Votes
    3 Posts
    166 Views

    @phenomlab Thanks, have DMed you

  • NodeBB: Favicon upload issue

    Solved Configure
    12
    3 Votes
    12 Posts
    355 Views

    @phenomlab I am on a Mac, so I used the “Option + Command + I”, and then performed the steps. It loaded my favicon! I checked on Firefox which I haven’t used before, and it showed my favicon also! That’s fantastic and thank you for the help!

  • 1 Votes
    5 Posts
    558 Views

    @DownPW very useful tip. Thanks

  • Rotating homepage icons, gifs?

    Solved Configure
    2
    3 Votes
    2 Posts
    194 Views

    @eveh It’s not a GIF, no. It’s actually a webp file so made much smaller, and uses keyframes to control the rotation on hover. You can easily make your own though 🙂

    The CSS for that is as below

    @keyframes rotate180 { from { transform: rotate(0deg); } to { transform: rotate(180deg); } } @keyframes rotate0 { from { transform: rotate(180deg); } to { transform: rotate(0deg); } }

    Your milage may vary on the CSS below, as it’s custom for Sudonix, but this is the class that is used to control the rotate

    .header .forum-logo, img.forum-logo.head { max-height: 50px; width: auto; height: 30px; margin-top: 9px; max-width: 150px; min-width: 32px; display: inline-block; animation-name: rotate180, rotate0; animation-duration: 1000ms; animation-delay: 0s, 1000ms; animation-iteration-count: 1; animation-timing-function: linear; transition: transform 1000ms ease-in-out; }
  • 3 Votes
    2 Posts
    554 Views

    @pwsincd welcome to sudonix, and thanks for the comments. What your looking for is here

    https://sudonix.com/topic/195/nodebb-welcome-message/3?_=1648295651358

  • 3 Votes
    12 Posts
    980 Views

    @cagatay you’ll need to define this in the body tag (or another element if you want greater or more granular targets) - for example

    body { font-family: "Poppins"; font-size: 16px; }

    Essentially, you use the font-size CSS directive.

  • NodeBB Design help

    Solved Customisation
    8
    2 Votes
    8 Posts
    828 Views

    @riekmedia I’ve applied some new CSS to your site. Can you reload the page and try again ?

    For the record, this is what I added

    #footer { background: #2d343e; border-top: 4px solid #2d343e; font-size: 0.9em; margin-top: 70px; padding: 80px 0 0; position: relative; clear: both; bottom: 0; left: 0; right: 0; z-index: 1000; margin-left: -15px; margin-right: -338px; }

    The /categories page seems a bit messed up, so looking at that currently

    EDIT - issued some override CSS in the CATEGORIES widget

    <!--- CSS fix for overspill on /categories page - DO NOT DELETE --> <style> #footer { margin-right: -45px; } </style>

    That should resolve the /categories issue.

  • 3 Votes
    9 Posts
    425 Views

    @Sala Yes, I personally use Edge. Hated Internet Exploder (misspell intentional) but seeing as Edge is Chromium and Webkit backed, it works for me.