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
  • 3 Votes
    6 Posts
    2k Views
    @kadir-ay-0 marking as resolved based on https://community.nodebb.org/topic/17109/manual-build-a-night-mode-for-harmony/5 Please do not raise requests in two places - here and the NodeBB forums. All this does is create unnecessary load for both parties.
  • 1 Votes
    2 Posts
    724 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
  • help me to get rid of my old CDN

    Moved Customisation stackpath cdn
    13
    2 Votes
    13 Posts
    2k Views
    @Hari Ok. Good. Thanks
  • 4 Votes
    8 Posts
    4k Views
    @DownPW done
  • [NODEBB] Help for my custom CSS

    Solved Customisation nodebb css bugfix
    237
    49 Votes
    237 Posts
    81k 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 !!
  • Border Frame WYSIWYG CSS

    Solved Customisation css wysiwyg
    6
    1
    2 Votes
    6 Posts
    1k Views
    @DownPW just circling back to this, as I did eventually find the class. Seems you can disable the outline using the below CSS textarea { outline: none; }
  • NodeBB Design help

    Solved Customisation
    8
    3
    2 Votes
    8 Posts
    2k 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.