Skip to content

[NODEBB] CSS Style Sheets SelectBox

Locked Solved Customisation
112 2 32.9k 1
  • OK Thanks.
    You have change id="user_dropdown with id=โ€œtheme_dropdownโ€

    Can you will see for others problem after?

    @downpw Iโ€™m running low on free time now sadly, but more then happy to get this resolved for you tomorrow or later in the week of that works for you.

    The issue here is that Iโ€™ve reused some of the existing code from NodeBB and that may be causing some issues. Donโ€™t worry. Weโ€™ll get there ๐Ÿ‘

  • @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    @downpw Iโ€™m running low on free time now sadly, but more then happy to get this resolved for you tomorrow or later in the week of that works for you.
    The issue here is that Iโ€™ve reused some of the existing code from NodeBB and that may be causing some issues. Donโ€™t worry. Weโ€™ll get there

    OK Thanks sir ๐Ÿ™‚
    I really hope ! You are a super hero !

    I also hope that when done this will work on future nodeBB updates/upgrade.
    PM me when you have the time for that I turn on the VM

  • @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    @downpw Iโ€™m running low on free time now sadly, but more then happy to get this resolved for you tomorrow or later in the week of that works for you.
    The issue here is that Iโ€™ve reused some of the existing code from NodeBB and that may be causing some issues. Donโ€™t worry. Weโ€™ll get there

    OK Thanks sir ๐Ÿ™‚
    I really hope ! You are a super hero !

    I also hope that when done this will work on future nodeBB updates/upgrade.
    PM me when you have the time for that I turn on the VM

    @downpw no issues. Itโ€™ll work across upgrades as itโ€™s a standard function and doesnโ€™t rely on any NodeBB components. If you can just ensure that the VM is available around the same time each day, that would also help.

  • @downpw no issues. Itโ€™ll work across upgrades as itโ€™s a standard function and doesnโ€™t rely on any NodeBB components. If you can just ensure that the VM is available around the same time each day, that would also help.

    @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    If you can just ensure that the VM is available around the same time each day, that would also help.

    Ok no problem Sir ๐Ÿ˜‰

  • @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    If you can just ensure that the VM is available around the same time each day, that would also help.

    Ok no problem Sir ๐Ÿ˜‰

    @downpw Right. I think I have this working the way youโ€™d like

    9178fb7a-04b8-4b34-95cd-6bf47d8b368a-image.png

    This uses the below CSS I have placed into your ACP. It should not be deleted

    // PLEASE DO NOT DELETE THIS
    
    .header #theme_dropdown {
        padding: 9px 15px;
        padding-top: 9px;
        padding-bottom: 9px;
        margin-top: -4px;
        padding-top: 14px;
        padding-bottom: 16px;
    }
    #switcher{
        position: absolute;
        right: 33%;
    }
    

    The :hover class is always going to look like the below

    07a054c4-57bd-4817-8823-785116ed97b6-image.png

    The reason for this is because you have it hard coded in the ACP CSS as below

    /*VIOLENCE: Couleur du background au survol souris */
    .navbar-default .navbar-nav>li>label:hover {
        background: #555555;
    }
    

    You should remove this, and set it based on the color you want in each external CSS file. This way, it will display correctly.

    The slight caveat with this is that it has to use absolute positioning meaning that if you resize the browser, the theme switcher icon will use a percentage to work out where it needs to be, and wonโ€™t be governed by the <ul><li> it sits inside. This is the only way to get the effect you are looking for.

  • @downpw Right. I think I have this working the way youโ€™d like

    9178fb7a-04b8-4b34-95cd-6bf47d8b368a-image.png

    This uses the below CSS I have placed into your ACP. It should not be deleted

    // PLEASE DO NOT DELETE THIS
    
    .header #theme_dropdown {
        padding: 9px 15px;
        padding-top: 9px;
        padding-bottom: 9px;
        margin-top: -4px;
        padding-top: 14px;
        padding-bottom: 16px;
    }
    #switcher{
        position: absolute;
        right: 33%;
    }
    

    The :hover class is always going to look like the below

    07a054c4-57bd-4817-8823-785116ed97b6-image.png

    The reason for this is because you have it hard coded in the ACP CSS as below

    /*VIOLENCE: Couleur du background au survol souris */
    .navbar-default .navbar-nav>li>label:hover {
        background: #555555;
    }
    

    You should remove this, and set it based on the color you want in each external CSS file. This way, it will display correctly.

    The slight caveat with this is that it has to use absolute positioning meaning that if you resize the browser, the theme switcher icon will use a percentage to work out where it needs to be, and wonโ€™t be governed by the <ul><li> it sits inside. This is the only way to get the effect you are looking for.

    @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    @downpw Right. I think I have this working the way youโ€™d like

    9178fb7a-04b8-4b34-95cd-6bf47d8b368a-image.png

    This uses the below CSS I have placed into your ACP. It should not be deleted

    // PLEASE DO NOT DELETE THIS
    
    .header #theme_dropdown {
        padding: 9px 15px;
        padding-top: 9px;
        padding-bottom: 9px;
        margin-top: -4px;
        padding-top: 14px;
        padding-bottom: 16px;
    }
    #switcher{
        position: absolute;
        right: 33%;
    }
    

    The :hover class is always going to look like the below

    07a054c4-57bd-4817-8823-785116ed97b6-image.png

    The reason for this is because you have it hard coded in the ACP CSS as below

    /*VIOLENCE: Couleur du background au survol souris */
    .navbar-default .navbar-nav>li>label:hover {
        background: #555555;
    }
    

    You should remove this, and set it based on the color you want in each external CSS file. This way, it will display correctly.

    The slight caveat with this is that it has to use absolute positioning meaning that if you resize the browser, the theme switcher icon will use a percentage to work out where it needs to be, and wonโ€™t be governed by the <ul><li> it sits inside. This is the only way to get the effect you are looking for.

    Hmmm, itโ€™s problematic. Itโ€™s not very aesthetic.
    I am amazed because it works very well on your site or with night mode.
    7b6a5a8e-ed62-4396-9872-1f183153bf10-image.png

    I see red background too on fa -faw ???
    94c88d8c-1cc2-4e49-9f3f-024b2aec1898-image.png

  • @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    @downpw Right. I think I have this working the way youโ€™d like

    9178fb7a-04b8-4b34-95cd-6bf47d8b368a-image.png

    This uses the below CSS I have placed into your ACP. It should not be deleted

    // PLEASE DO NOT DELETE THIS
    
    .header #theme_dropdown {
        padding: 9px 15px;
        padding-top: 9px;
        padding-bottom: 9px;
        margin-top: -4px;
        padding-top: 14px;
        padding-bottom: 16px;
    }
    #switcher{
        position: absolute;
        right: 33%;
    }
    

    The :hover class is always going to look like the below

    07a054c4-57bd-4817-8823-785116ed97b6-image.png

    The reason for this is because you have it hard coded in the ACP CSS as below

    /*VIOLENCE: Couleur du background au survol souris */
    .navbar-default .navbar-nav>li>label:hover {
        background: #555555;
    }
    

    You should remove this, and set it based on the color you want in each external CSS file. This way, it will display correctly.

    The slight caveat with this is that it has to use absolute positioning meaning that if you resize the browser, the theme switcher icon will use a percentage to work out where it needs to be, and wonโ€™t be governed by the <ul><li> it sits inside. This is the only way to get the effect you are looking for.

    Hmmm, itโ€™s problematic. Itโ€™s not very aesthetic.
    I am amazed because it works very well on your site or with night mode.
    7b6a5a8e-ed62-4396-9872-1f183153bf10-image.png

    I see red background too on fa -faw ???
    94c88d8c-1cc2-4e49-9f3f-024b2aec1898-image.png

    @downpw said in [NODEBB] CSS Style Sheets SelectBox:

    Hmmm, itโ€™s problematic. Itโ€™s not very aesthetic.
    I am amazed because it works very well on your site or with night mode.

    The theme switcher you have doesnโ€™t work the same way as the night mode plugin. What you have is a dropdown which is not the same as the toggle selection hence it will behave differently.

    What isnโ€™t aesthetic exactly ?

    @downpw said in [NODEBB] CSS Style Sheets SelectBox:

    I see red background too on fa -faw ???

    Yes, that comes from the below class on line 415 of your CSS in the ACP

    /*VIOLENCE: Couleur du background de l'icone de recherche au survol souris */  
    .navbar-default .btn-link:hover {
        background: red;
    }
    
  • @DownPW another wayโ€ฆ

    Remove

    #switcher{
        position: absolute;
        right: 33%;
    }
    

    Add

    .navbar-default {
        height: 50px;
    }
    

    This way, itโ€™s aestheticโ€ฆI just set the changes. Let me know what you think.

  • @DownPW another wayโ€ฆ

    Remove

    #switcher{
        position: absolute;
        right: 33%;
    }
    

    Add

    .navbar-default {
        height: 50px;
    }
    

    This way, itโ€™s aestheticโ€ฆI just set the changes. Let me know what you think.

    @phenomlab

    Itโ€™s better.

    I have just to set space between icon

    For the red, i have disable CSS on line number 415, itโ€™s not that

  • @phenomlab

    Itโ€™s better.

    I have just to set space between icon

    For the red, i have disable CSS on line number 415, itโ€™s not that

    @downpw said in [NODEBB] CSS Style Sheets SelectBox:

    For the red, i have disable CSS on line number 415, itโ€™s not that

    Odd. This will stop it

    #switcher .btn-link:hover {
        background: none !important;
    }
    
  • Yeah Itโ€™s good

  • Yeah Itโ€™s good

    @downpw Great. I think weโ€™re done, yes ?

  • Hmm I search to reducs space between Icon search bar and notification icon

  • Hmm I search to reducs space between Icon search bar and notification icon

    @downpw Can you provide a screenshot to explain what you are looking for ?

  • off course @phenomlab
    I search to reducs space between Icon search bar and notification icon

    4c1df3fb-ffe3-4097-b058-f6fd7011f679-image.png

  • off course @phenomlab
    I search to reducs space between Icon search bar and notification icon

    4c1df3fb-ffe3-4097-b058-f6fd7011f679-image.png

    @downpw Try

    #switcher {
        margin-right: -15px;
        margin-left: -15px;
    }
  • @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    #switcher {
    margin-right: -15px;
    margin-left: -15px;
    }

    Yes very Good !!!
    Like this The button is well : Thanks

    baaaa269-6f3e-4a51-acc6-b05138b51349-image.png

  • @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    #switcher {
    margin-right: -15px;
    margin-left: -15px;
    }

    Yes very Good !!!
    Like this The button is well : Thanks

    baaaa269-6f3e-4a51-acc6-b05138b51349-image.png

    @downpw

    Right. I moved the custom HTML to a HTML based global widget, and that works ๐Ÿ™‚ Give it a try

    Also, not sure why you are using the html class for the background images. You should use body. I just tried it, and it works fine

  • @DownPW some additional advice. The images you are calling remotely should be hosted on your own server. This will prevent unnecessary remote calls, and will also load faster. Iโ€™m seeing delay times of up to a second before the wallpaper appears ๐Ÿ™‚

  • @phenomlab

    Ok if I understood, I canโ€™t use custom ACP Header for HTML code. I must use an HTML widgets.

    For background, I use the code on NodeBB forum but if you have a code working great on desktop and mobile. II want it a lot
    ๐Ÿ™‚


Did this solution help you?
Did you find the suggested solution useful? Support ๐Ÿ’— Sudonix with a coffee โ˜•
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics