Skip to content

Footer bar add center text

Solved Customisation
  • Hello @phenomlab

    I have almost the same footerbar as yours without the welcome message. (your old one actually)

    I just wanted to add some text in its center.

    Rather than having 2 blocks (left and right) I wanted a left, center, right block.

    I added a div in the middle of the 2 but the right div is no longer displayed.

    html :

    <!DOCTYPE html>
    <br>
    <br>
    <div id="console-nav-tab"><i class="fa-solid fa-angles-left"></i></div>
    <div id="console-nav-footer">
    <div id="footer-content">
    <div id="floatleft"> ©2022  XXXXXXXXXXXX
    
    <div class="margin-left">
    <a href="https://XXXXXXXXxxxxxxxxxxxxxxxxxx" class="far fa-file-alt"></a>
    </div>
    
    <div class="margin-left">
    <a href="https://XXXXXXXXxxxxxxxxxxxxxxxxxx" class="fas fa-users"></a>
    </div>
    
    <div class="margin-left">
    <a href="https://XXXXXXXXxxxxxxxxxxxxxxxxxx/" class="fab fa-wikipedia-w"></a>
    </div>
    
    <div class="margin-left">
    <a href="https://XXXXXXXXxxxxxxxxxxxxxxxxxx" class="fas fa-bug"></a>
    </div>
    
    </div>
    
    <div id="floatcenter"> 
    <div class="textcenter">!!!!!!! Some new center footerbar text !!!!!</div>
    </div>
    
    <div id="floatright">
            <a class="feedback-menu-far-right" target="_blank" href="https://XXXXXXXXxxxxxxxxxxxxxxxxxx">RGPD</a>
            <a class="feedback-menu-far-right" target="_blank">|</a>
            <a class="feedback-menu-far-right" target="_blank" href="https://XXXXXXXXxxxxxxxxxxxxxxxxxx">@dev</a>
    <a class="feedback-menu-far-right" target="_blank">|</a>
    <a class="feedback-menu-far-right" target="_blank" href="hhttps://XXXXXXXXxxxxxxxxxxxxxxxxxx">Hetzner Affiliation</a>
    <a class="feedback-menu-far-right" target="_blank">|</a>
    <a class="feedback-menu-far-right" target="_blank" href="https://sudonix.com">Sudonix </a>
    
    </div>
    </div>
    </div>
    

    CSS:

    div#console-nav-tab {
        position: fixed;
        bottom: 0px;
        /*z-index: 1100;*/
        z-index: 1050;
        height: 30px;
        left: 0px;
    }
    
    div#console-nav-tab i {
        font-size: 16px;
        margin-left: 10px !important;
        line-height: 2.0 !important;
    }
    
    .toBottom {
       bottom: 0px !important;
    }
    
    /*Desktop*/
    #console-nav-footer {
        background-color: #eeeeee;
        border-top: 1px solid #aaa;
        position: fixed;
        bottom: 0;
        height: 30px;
        padding-left: 10px;
        padding-right: 10px;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    #floatleft {
        float: left;
        padding-left: 25px;
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        display: flex;
        color: #666666 !important;
    }
    
    .margin-left {
        margin-left: 5px;
        font-weight: 500 !important;
    }
    
    a.far.fa-file-alt {
        /*background: #007bb5*/
        /*background: #bbb;*/
        background: #eee;
        /*color: white;*/
        color: #6c757d;
        height: 33px;
        padding: 7px;
        font-size: 16px;
        width: 33px;
        text-align: center;
        text-decoration: none;
        box-shadow: none;
        border-radius: 0px;
        background-image: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
    }
    
    a.fas.fa-users {
        color: #6c757d;
        height: 33px;
        padding: 7px;
        font-size: 16px;
        width: 33px;
        text-align: center;
        text-decoration: none;
        box-shadow: none;
        border-radius: 0px;
        /*background: #55ACEE;*/
        background: #eee;
        background-image: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
    }
    
    a.fab.fa-wikipedia-w {
        color: #6c757d;
        height: 33px;
        padding: 7px;
        font-size: 16px;
        width: 33px;
        text-align: center;
        text-decoration: none;
        box-shadow: none;
        border-radius: 0px;
        /*background: #55ACEE;*/
        background: #eee;
        background-image: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
    }
    
    a.fas.fa-bug {
        color: #6c757d;
        height: 33px;
        padding: 7px;
        font-size: 16px;
        width: 33px;
        text-align: center;
        text-decoration: none;
        box-shadow: none;
        border-radius: 0px;
        /*background: #bb0000;*/
        background: #eee;
        background-image: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
    }
    
    
    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        display: flex;
        color: #666666 !important;
        
    }
    
    .textcenter {
        margin-left: auto;
        margin-right: auto;
        font-weight: 800 !important;
    }
    
    
    
    #floatright {
        float: right;
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        display: flex;
    }
    
    a.feedback-menu-far-right {
        padding-right: 5px;
        padding-left: 5px;
        text-decoration: none;
        color: #666666 !important;
        font-weight: bold;
    }
    

    Here the result

    67b2a553-ac1f-4801-8479-aaf25efebf7e-image.png

    Thank you for the tips

  • @DownPW Do you have this setup in a dev environment anywhere? If not, no issue - I can reproduce it in mine.

  • @phenomlab

    Arf not sorry, not under my hand directly.

  • @DownPW No problems. Try adding this additional CSS

    #floatcenter {
        margin: 0 auto;
        text-align: center;
        width: 50%;
    }
    
  • @phenomlab

    Nope Same Result.

    Nothing change 😞

  • @DownPW that’s strange. I used your code to add the additional element and bound the css I supplied above and it worked fine.

    Can you check and see if the css is being overridden somewhere?

  • @phenomlab

    51054ca1-88bc-4ec7-b4c5-21a0c5e0a0eb-image.png
    e751af3a-77f2-4680-aaff-bfaa16c64fe5-image.png

    No the code is here But the floatright div is invisible .

  • @DownPW again, odd. I’ll need to have another look at this and revert. ,

  • Nothing conclusive on my side

  • @DownPW I’ll try again a bit later and provide full html and css. I’ll base it on your site.

  • Ok the code I provided above is the same as my website. But do like you want my friends if you prefer 😉

  • @DownPW I thought it looked familiar. When I checked yesterday the central text part was missing, so I’ll add that via the console and develop from there. This will only be visible for my browser session so no impact to anyone else.

  • @DownPW I see the issue. Use my CSS still, but from your CSS, remove

    #floatright {
        display: flex;
    }
    

    You should land up with

    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: 0 auto;
        text-align: center;
        width: 50%;
    }
    

    b37d32dd-873a-4817-8da5-4411d2ebea74-image.png

  • @phenomlab

    Nope same problem with :

    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: 0 auto;
        text-align: center;
        width: 50%;
    }
    
    .textcenter {
        margin-left: auto;
        margin-right: auto;
        font-weight: 800 !important;
    }
    
    
    #floatright {
        float: right;
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        /*display: flex;*/
    }
    
  • @DownPW try with

    display: inherit;
    
  • @phenomlab On floatright ?

  • @DownPW Test in floatright = same result

  • @DownPW sorry. Try either

    display: inline;
    

    Or

    display: inline-block;
    

    You might need !important depending on cascading settings

    Edit - for clarity, this should be in the #floatcenter block

  • @phenomlab

    Houra, it’s OK with inline-block

    On the other hand, I see that the text is well centered in the div but I notice that the div itself is not centered.
    Indeed I see a substantial space between the floatcenter div and floatright div.
    You can see it in the screenshot below.

    e1fb1c73-e19d-4548-aa73-9f8456830018-image.png

    Again my HTML/CSS

    <div id="floatcenter"> Some centered text
        </div>
    
    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: auto auto;
        text-align: center;
        width: 50%;
        display: inline-block !important;
    }
    
  • @DownPW strange. I don’t recall seeing that issue when I created this using the console live on your site. This is likely due to width constraints on the parent div.

    In the above CSS you could try to set width to auto rather than 50%, but then you will need to set width: 100%; on the parent div


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 💗

Related Topics
  • easy way to add multilanguage banner

    Unsolved Customisation
    12
    5 Votes
    12 Posts
    468 Views

    @phenomlab hi Mark, no worries. I will definitely write my experience here… 🙂

    Unfortunately, I could not find time to try it yet.

  • hover link effect

    Solved Customisation
    18
    6 Votes
    18 Posts
    1k Views

    @DownPW Looking at the underlying code, class start is being added on hover by jQuery in this function

    document.querySelectorAll(".button-gradient, .button-transparent").forEach((button) => { const style = getComputedStyle(button); const lines = document.createElement("div"); lines.classList.add("lines"); const groupTop = document.createElement("div"); const groupBottom = document.createElement("div"); const svg = createSVG( button.offsetWidth, button.offsetHeight, parseInt(style.borderRadius, 10) ); groupTop.appendChild(svg); groupTop.appendChild(svg.cloneNode(true)); groupTop.appendChild(svg.cloneNode(true)); groupTop.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); lines.appendChild(groupTop); lines.appendChild(groupBottom); button.appendChild(lines); button.addEventListener("pointerenter", () => { button.classList.add("start"); }); svg.addEventListener("animationend", () => { button.classList.remove("start"); }); }); })

    The CSS for start is below

    .button-gradient.start .lines svg, .button-transparent.start .lines svg { animation: stroke 0.3s linear; }

    And this is the corresponding keyframe

    @keyframes stroke { 30%, 55% { opacity: 1; } 100% { stroke-dashoffset: 5; opacity: 0; } }

    It’s using both CSS and SVG, so might not be a simple affair to replicate without the SVG files.

  • 9 Votes
    32 Posts
    3k Views

    @DownPW said in Bottom footer navbar button extend:

    Oh my god, it’s beautiful mark

    I liked this design so much, I’ve implemented it here. I intend to do a lot more with the footer in due course, so hiding it makes a lot of sense. Thanks @DownPW for the idea and initial concept ♥

  • Blinking text Effect

    Customisation
    3
    5 Votes
    3 Posts
    462 Views

    @phenomlab

    I love it too

    @phenomlab said in Blinking text Effect:

    Has that “broken neon light” look that you see in films.

    It’s exactly that, kind of old neon signs of bar or pubs a bit cyberpunk too 😉

  • NodeBB changing color of the text

    Solved Customisation
    7
    2 Votes
    7 Posts
    843 Views

    @phenomlab said in NodeBB changing color of the text:

    @marusaky This ought to to it

    a.permalink, a.permalink:active, a.permalink:focus, a.permalink:hover { color: #ffffff; }

    works great, thanks a lot

  • 5 Votes
    9 Posts
    2k Views

    @phenomlab

    Very very great Mark 😉
    Thanks again, It’s perfect now !

    –> I share my code that I modified.

    I’ve added French and English comments.
    If you see things to change Mark, don’t hesitate.

    As usual, all the access paths (FA icons, logo) will have to be modified according to your architecture.

    You can also very well add/remove time slots and change welcome messages to suit your needs.

    Widgets ACP/HTML Widget Footer Logo <center> <br><br> <img id="thislogo" src="path/to/my/image"> </center> Widget Welcome Message <!-- IF loggedIn --> <div class="getUsername">, <a href="/me"><span class="username"></span></a></div> <!-- ENDIF loggedIn --> CSS

    – I added the size font-weight: 900; in the CSS because otherwise some FA icon wasn’t displayed correctly and reduce margin :

    i#thisicon { font-family: "Font Awesome 5 Free"; font-style: normal; margin-right: 8px; font-weight: 900; } .getUsername { padding-top: 20px; text-align: right; } /*Smartphone*/ /*On désactive le message de bienvenue"*/ /*We disable the welcome message"*/ @media all and (max-width: 1024px) { .getUsername { display: none; } } JAVASCRIPT // ------------------------------------------ // Welcome Message avec icône et Footer logo // Welcome Message with icon and Footer logo // ------------------------------------------ $(window).on('action:ajaxify.end', function (data) { //On récupère le username dans le DOM et on l'affiche //We retrieve the username from the DOM and display it function updateUsername() { $('.getUsername .username').text(app.user.username); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', updateUsername); } else { updateUsername(); } //On déclare les variables principales (themessage & thehours) ainsi que les variables secondaires correspondants aux plages horaires //We declare the main variables (themessage & thehours) as well as the secondary variables corresponding to the time slots var thehours = new Date().getHours(); var themessage; var wakeup = ('Good day'); var morning = ('Good morning'); var lunch = ('Bon appétit'); var afternoon = ('Good afternoon'); var drink = ('Cheers'); var evening = ('Good evening'); var night = ('Good night'); var welcome = ('Welcome'); var matched = false; //On peux ici tester le résultat du code en spécifiant une heure (!!!IMPORTANT: Commenter une fois le script testé!!!) //Here we can test the result of the code by specifying a time (!!!IMPORTANT: Comment once the script has been tested!!!) //thehours = 20 //On déclare les plages horaires avec les icones FA et les logos //We declare the time slots with FA icons and logos path if (thehours >= 0 && thehours < 6) { themessage = night; theicon = "fa-solid fa-moon"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 6 && thehours < 8) { themessage = wakeup; theicon = "fa-solid fa-mug-hot"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 8 && thehours < 12) { themessage = morning; theicon = "fa-solid fa-sun"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 12 && thehours < 13) { themessage = lunch; theicon = "fas fa-hamburger"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 13 && thehours < 16) { themessage = afternoon; theicon = "fa-solid fa-sun"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 16 && thehours < 18) { themessage = welcome; theicon = "fa-solid fa-rocket"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 18 && thehours < 19) { themessage = drink; theicon = "fa-solid fa-wine-glass"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 19 && thehours < 20) { themessage = lunch; theicon = "fas fa-pizza-slice"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 20 && thehours < 24) { themessage = evening; theicon = "fa-solid fa-tv"; thelogo = "/assets/customlogo/XXX.png"; } // Si la page active est un topic, on désactive/cache le message de bienvenue // If the active page is a topic, we deactivate/hide the welcome message if (window.location.href.indexOf("topic") > -1) { console.log("This is a topic, so hide the user welcome message"); $('#thisuser').hide(); } // Sinon, on affiche le message en fonction, l'icone FA et son emplacement (prepend) // Otherwise, we display the message in function, the FA icon and its location (prepend) else { $('.getUsername').prepend("<i id='thisicon' class='" + theicon + "'></i>" + themessage); $("#thislogo").attr("src", thelogo); //$('.getUsername').prepend("<img id='thisicon' src='" + thelogo + "'></>" + themessage); } });
  • [NODEBB] Help for my custom CSS

    Solved Customisation
    193
    38 Votes
    193 Posts
    32k Views

    OMG make sense

    Thanks dude 🙂

  • Reading Meter Progress bar

    Locked Solved Customisation
    15
    9 Votes
    15 Posts
    1k Views

    For anyone else following this thread, please see
    https://sudonix.com/topic/467/issues-with-progress-bar-on-v3