Tagged: x
-
AuthorPosts
-
August 12, 2016 at 9:03 am #1128762
SmartOrderParticipantHi Team,
I was looking to place a border around a specific item on the menu. The site in question is http://www.adaptx.com.au/ and the menu item is ‘Get Started’.
I need a border that has some padding around it so that it looks like a button. Ideally it will also change colour (from white to black) when the navbar changes colour on scroll.
Cheers
Martin
August 12, 2016 at 11:10 am #1128896
JoaoModeratorHi Martin,
Please add the following code to Appereance Customizer Custom CSS and adjust the settings acordding to your wishes.
#menu-item-807 a { color: #fff; border-color: #ff7600; background-color: #ff7600; text-shadow: 0 0.075em 0.075em rgba(0,0,0,0.5); border-radius: 0.25em; padding-top: 12px; height: 35px; margin-top: 22px; } #menu-item-807 a span { box-shadow: none; } #menu-item-807 a:hover { color: #fff; border-color: #3f96ce; background-color: #3f96ce; text-shadow: 0 0.075em 0.075em rgba(0,0,0,0.5); box-shadow: none; }Hope it helps
Joao
August 12, 2016 at 9:10 pm #1129526
SmartOrderParticipantHi Joao,
That gave me a few ideas and I was able to add the border on the initial transparent navbar. However, if you look at the site now the Get Started label shifts down on scroll. Can you suggest a fix to this? I would also like to change the colour of the border when the background changes to white.
Cheers
August 13, 2016 at 2:39 am #1129707
FriechModeratorHi There,
You can add this under Custom > CSS in the Customizer.
.x-navbar.x-navbar-fixed-top .x-nav>li#menu-item-807>a { padding-top: 10px !important; border-color: #3398db; }Hope it helps, Cheers!
August 13, 2016 at 2:46 am #1129711
SmartOrderParticipantIn Joao absence, does anybody else have an idea?
The changing in navbar appearance is handled by
.x-navbar {
background-color: transparent;
border-bottom: none;
box-shadow: none;
}.x-navbar.x-navbar-fixed-top {
background-color: white;
height: 70px;
}.x-navbar.x-navbar-fixed-top .x-nav > li > a {
padding-top: 30px !important;
}and
jQuery(function($){
$(window).scroll(function(){
if( $(this).scrollTop() == 0 ) {
$(‘.x-navbar-fixed-top’).removeClass(‘x-navbar-fixed-top’);
}})
});
August 13, 2016 at 2:48 am #1129714
SmartOrderParticipantjust saw the above response. Worked like a charm. Thank you guys!!
August 13, 2016 at 3:50 am #1129765
ChristopherModeratorYou’re welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1128762 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
