Skip to content

CSS Help on my Flarum

Solved Customisation
5 2 1.4k
  • SO I really like the details plugin in and use it in a lot of my posts on my own flarum. To add drop downs for extra information or well placed affiliate links 😃

    FPEyph9.png

    I have some custom CSS so far:

    details {
    
        padding: .8em !important;
        background: #353535;
        border-radius: 20px;
        margin-bottom: .8em;
    }
    
    summary::-webkit-details-marker {display: none; }
    
    details summary::before { 
        content:"►"; 
        padding: .7em;
    }
    
    details[open] summary::before { 
        content:"▼"; 
        padding: .7em;
    }
    

    I am struggling with the CSS though and couldn’t figure one of my issues out while using inspect element on Google Chrome. When I open the details I get this line on the left side and cant figure out how to remove it:

    sdHCCsQ.png

    If you need to see it live, you can see the example from the picture above here.

  • SO I really like the details plugin in and use it in a lot of my posts on my own flarum. To add drop downs for extra information or well placed affiliate links 😃

    FPEyph9.png

    I have some custom CSS so far:

    details {
    
        padding: .8em !important;
        background: #353535;
        border-radius: 20px;
        margin-bottom: .8em;
    }
    
    summary::-webkit-details-marker {display: none; }
    
    details summary::before { 
        content:"►"; 
        padding: .7em;
    }
    
    details[open] summary::before { 
        content:"▼"; 
        padding: .7em;
    }
    

    I am struggling with the CSS though and couldn’t figure one of my issues out while using inspect element on Google Chrome. When I open the details I get this line on the left side and cant figure out how to remove it:

    sdHCCsQ.png

    If you need to see it live, you can see the example from the picture above here.

    @mike-jones Hey Mike - this CSS will fix that

    details>div {
        border-left: none;
    }
    

    Before

    f5d3f045-d571-4cb5-b51c-e8d2f0264573-image.png

    After

    abf773d1-0b39-4a00-b02e-e2fa3f822e14-image.png

  • @mike-jones Hey Mike - this CSS will fix that

    details>div {
        border-left: none;
    }
    

    Before

    f5d3f045-d571-4cb5-b51c-e8d2f0264573-image.png

    After

    abf773d1-0b39-4a00-b02e-e2fa3f822e14-image.png

    @phenomlab said in CSS Help on my Flarum:

    details>div {
    border-left: none;
    }

    Si I just added that and cleared my flarum and recache cache and it didn’t go away. Not sure what I am doing wrong.

  • So maybe not the right answer but I had to add

    !important
    

    to get it to work…

  • phenomlabundefined phenomlab has marked this topic as solved on
  • So maybe not the right answer but I had to add

    !important
    

    to get it to work…

    @mike-jones Yes, you’ll typically see this type of behaviour if there is another style that has higher priority in the sense that yours will be overridden. Using !important will override the higher preference, but should be used sparingly rather than everywhere.

  • phenomlabundefined phenomlab unlocked this topic on

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
  • Please help me, I can't install nodebb

    Locked Solved Customisation nodebb
    7
    5 Votes
    7 Posts
    919 Views
    Installation completed, verified, and tested. Correct installation methodology is below https://docs.nodebb.org/installing/os/ubuntu/
  • 1 Votes
    2 Posts
    717 Views
    Closing this in favour of https://sudonix.com/topic/357/post-style-view/28
  • Quote design CSS

    Solved Customisation css quote
    15
    1
    4 Votes
    15 Posts
    3k Views
    @DownPW yes, that does make sense actually. I forgot to mention the layout of Sudonix is custom so that would have an impact on the positioning. Good spot
  • answers appearance css code request

    Solved Customisation css answers
    11
    1
    1 Votes
    11 Posts
    2k Views
    @DownPW yes, because of the modifications that Sudonix uses, you’ll need to tailor to fit your needs.
  • New message CSS problem

    Unsolved Customisation css
    11
    1
    2 Votes
    11 Posts
    2k Views
    @DownPW hi. Sorry for digging up an old post, but I’m going through items still unresolved and was looking to get an understanding of where you are currently with this?
  • 4 Votes
    8 Posts
    4k Views
    @DownPW done
  • [NODEBB] Help for my custom CSS

    Solved Customisation nodebb css bugfix
    237
    49 Votes
    237 Posts
    80k Views
    @baris said: You should change your selectors so it doesn’t look at the entire document. You probably only want to apply fancybox to stuff inside the #content element which is what changes when the user navigates around the page. So use $('#content a').... for your selectors then the forum logo in the header won’t be selected. I modified the JS Fancybox code now and this code and it seem better // --------------------------------------------- // Fancybox Media Reader (Without Website Logo) // --------------------------------------------- if (top.location.pathname !== '/login') { $(window).on('action:posts.loaded', function(data) { console.log("Polling DOM for lazyLoaded images to apply Fancybox"); $(document).ready(function() { $('#content a').not('.forum-logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); }); }); }); } if (top.location.pathname !== '/login') { $(document).ready(function() { $(window).on('action:ajaxify.end', function(data) { $('#content a').not('.logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); data.preventDefault() // Strip out the images contained inside blockquotes as this looks nasty :) $('#content blockquote img').remove(); }); Fancybox.bind( '#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]', { groupAll: true, } ); }); }); } // Chat fancybox - fires when chat module loaded and AJAX calls new chat $(document).ready(function() { $(window).on('action:chat.loaded', function(data) { // >>> Se limiter au contenu principal uniquement <<< $('#content img').not('.forum-logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { var newHref = $(this).attr("src"); $(this).wrap("<a class='fancybox' href='" + newHref + "'/>"); $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); data.preventDefault(); // Strip out the images contained inside blockquotes as this looks nasty :) $('#content blockquote img').remove(); }); Fancybox.bind( '#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]', { groupAll: true, } ); }); }); For the logo, I must use overflow: visible !important; on [component="brand/logo"] /* --- Logo --- */ [component="brand/logo"] { max-height: 50px; width: auto; height: auto; max-width: 100%; display: block; object-fit: contain; object-position: left center; overflow: visible !important; } Better result !!
  • Bug Navbar CSS

    Solved Customisation navbar css
    3
    1 Votes
    3 Posts
    957 Views
    Not better way. Thanks.