Tagged: x
-
AuthorPosts
-
February 15, 2017 at 6:34 am #1371831
omkar13ParticipantHi,
I am trying to add a small badge on the right corner of my navbar. how do i achieve that?
The badge size is 45×45 px.
Thanks in advance!February 15, 2017 at 6:43 am #1371837
ThaiModeratorHi There,
#1] Please add the following code under Customizer > Custom > Global Javascript:
jQuery('.x-navbar-inner .x-container').append('<img class="my-img" src="https://placeholdit.imgix.net/~text?w=45&h=45" />');#2] Please add the following CSS under Customizer > Custom > Global CSS:
img.my-img { float: right; margin-top: -35px; }Hope it helps 🙂
February 15, 2017 at 6:59 am #1371853
omkar13ParticipantThanks a lot ..that did the work! But the badge is showing before/leftside of menu items. How to fix it on right corner of the menu?
February 15, 2017 at 7:46 am #1371922
LelyModeratorHi There,
Update above CSS to this:
.x-nav-wrap.desktop { margin-right: 100px; } img.my-img { position: absolute; right: 0; top: 21px; }Hope this helps.
February 15, 2017 at 7:56 am #1371935
omkar13ParticipantThanks a ton! That did the fix 🙂
February 15, 2017 at 9:05 am #1372017
JoaoModeratorGlad to hear it,
Cheers
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1371831 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
