[NODEBB] Help for my custom CSS
-
@DownPW There isn’t any easy way to achieve this without using
position: absoluteon theimgitself. Even then, you’d need to manually alter the position of the child icons in the samediv(the sidebar). Whilst I do see the appeal, it’s not something I’d recommend doing to be honest.I succeeded in the following way by playing with the margins.
.sidebar #user_dropdown .avatar { margin: 2px -7px; width: 35px; height: 35px; }Result is good :

-
I’d like to do the same thing with the website logo.
For example, at Christmas time, I’d like to change my logo to something like a Santa hat, but it’s always cut off.
I’ve tried adjusting the size and margins, and even modifying the logo’s pixels directly, but it doesn’t seem to work. It’s always cut off in the same way.
-
I’d like to do the same thing with the website logo.
For example, at Christmas time, I’d like to change my logo to something like a Santa hat, but it’s always cut off.
I’ve tried adjusting the size and margins, and even modifying the logo’s pixels directly, but it doesn’t seem to work. It’s always cut off in the same way.
said in [NODEBB] Help for my custom CSS:
I’d like to do the same thing with the website logo.
For example, at Christmas time, I’d like to change my logo to something like a Santa hat, but it’s always cut off.
I’ve tried adjusting the size and margins, and even modifying the logo’s pixels directly, but it doesn’t seem to work. It’s always cut off in the same way.
-
-
-
resolve with :
li[component=post] a[href*=“/groups/administrators”] {
position: absolute !important;
left: 2px;
z-index: 2;
margin-top: 1px;
border-radius: 999px !important;
line-height: 14px;
display: block;
margin-left: 6px !important;
background: var(–bs-user-level-bg) !important;
color: var(–bs-body-color-primary) !important;
width: auto;
} -
resolve with :
li[component=post] a[href*=“/groups/administrators”] {
position: absolute !important;
left: 2px;
z-index: 2;
margin-top: 1px;
border-radius: 999px !important;
line-height: 14px;
display: block;
margin-left: 6px !important;
background: var(–bs-user-level-bg) !important;
color: var(–bs-body-color-primary) !important;
width: auto;
} -
-
-
if I set :
- {
overflow: visible !important;
}
it’s OK.
I have not overflow: hidden in my custom css on acp…
Maybe because Fancybox add an <a> no ?

- {
-
@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
#contentelement 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 !!
-
-
-
-
yes @downpw
So is taht the problem.
The core migrated to FA6 and no longer automatically includes the compatibility layers. Theall.cssalone is no longer enough because it only loads icons in native FA6 syntax (fa-solid,fa-regular, etc.). Your old icons using FA4 syntax (fa fa-something) are no longer recognized without the shims.Hence the need for the three files:
all.css: the FA6 icons themselvesv4-shims.css: the mapping table that remaps the old FA4 names to their FA6 equivalents (many icons were renamed between FA4 and FA6)v4-font-face.css: redeclares the FontAwesome@font-facewith the old family names (FontAwesomeinstead of"Font Awesome 6 Pro"), so CSS selectors targeting the oldfont-familykeep resolving
So if your customs still use FA4 syntax, all three are required.
I load my Custom FA like this in my ACP/Headers :
<link href="/assets/customfonts/FontAwesome.Pro.6.x.x/css/all.css" rel="stylesheet" /> <link href="/assets/customfonts/FontAwesome.Pro.6.x.x/css/v4-shims.css" rel="stylesheet" /> <link href="/assets/customfonts/FontAwesome.Pro.6.x.x/css/v4-font-face.css" rel="stylesheet" /> -
-
how i create those folders. i added ACP/HEADERS the codes but not working.
-
-
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<link href=“/assets/fonts/fonts.min.css?version=1” rel=“stylesheet”>
<link href=“/assets/customfonts/FontAwesome.Pro.6.x.x/css/all.css” rel=“stylesheet” />
<link href=“/assets/customfonts/FontAwesome.Pro.6.x.x/css/v4-shims.css” rel=“stylesheet” />
<link href=“/assets/customfonts/FontAwesome.Pro.6.x.x/css/v4-font-face.css” rel=“stylesheet” />
<script src=“https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js”></script>
<link rel=“stylesheet” href=“https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.css”/>
<a id=“pageUp” class=“”><i class=“fas fa-chevron-up”></i></a>
<div id=“readingposition” class=“reading-meter” style=“bottom: 0px;”>
<div class=“reading-meter-background rounded-1 border border-gray-300 ready”>
<div class=“reading-meter-progress-bar rounded-1” id=“progress-bar”>
</div>
</div>
</div>what i have now
-
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<link href=“/assets/fonts/fonts.min.css?version=1” rel=“stylesheet”>
<link href=“/assets/customfonts/FontAwesome.Pro.6.x.x/css/all.css” rel=“stylesheet” />
<link href=“/assets/customfonts/FontAwesome.Pro.6.x.x/css/v4-shims.css” rel=“stylesheet” />
<link href=“/assets/customfonts/FontAwesome.Pro.6.x.x/css/v4-font-face.css” rel=“stylesheet” />
<script src=“https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js”></script>
<link rel=“stylesheet” href=“https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.css”/>
<a id=“pageUp” class=“”><i class=“fas fa-chevron-up”></i></a>
<div id=“readingposition” class=“reading-meter” style=“bottom: 0px;”>
<div class=“reading-meter-background rounded-1 border border-gray-300 ready”>
<div class=“reading-meter-progress-bar rounded-1” id=“progress-bar”>
</div>
</div>
</div>what i have now
@cagatay if you look in the console (developers console in browser) do you see any error messages being returned?
Linux is case sensitive, and it’s possible to have the same filename and folder name in upper and lower case.
I suspect this might be the issue, but I could be wrong.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
