Tagged: x
-
AuthorPosts
-
August 2, 2016 at 9:28 pm #1114824
Raul MParticipantHey X
I have the same issue explained by Bryan on this post: anchors on the One Page Navigation cut of by the navigation bar
https://community.theme.co/forums/topic/offsetting-anchor-so-top-of-content-is-not-cut-off-by-nav-bar/I put the div you propose on my page and it’s working for my laptop version… but not for my mobile version, the bars still being cutted by the nav bar
http://awaodoriparis.com/fr/home2016/#programme
Thanks for your precious help!
August 3, 2016 at 3:30 am #1115084
ChristopherModeratorHi there,
Please remove fixed height from divs, see the attachment.
If it doesn’t help, please remove following code and check again :@media (max-width: 979px){ .x-navbar-fixed-top, .x-navbar-fixed-left, .x-navbar-fixed-right { position: fixed; } }Hope it helps.
August 3, 2016 at 4:43 am #1115140
Raul MParticipantHello Christopher,
Thanks for your answer but it doesn’t works AND your proposal make dissapears the navbar on the mobile version.
I need both :
– in mobile version the top bar has to be fixed
– and not cut the anchors by the nav bar (in desktop and mobile)I made the modifications you proposed on the Japanese version
http://awaodoriparis.com/jp/home-jp-2016/#programmeAnd I keep unchanged (with the mobile nav bar fixed + the anchors OK on desktop version) on the French version
http://awaodoriparis.com/fr/home2016/#programmeHoping you can find something to fix both 😉
Thanks for trying
RaulAugust 3, 2016 at 8:20 am #1115353
Paul RModeratorHi Raul,
You can add this under Custom > Edit Global Javascript in the Customizer.
jQuery(function($) { $(window).scroll(function() { if ( $(this).scrollTop() >= topbarOffset() ) { $('.x-topbar').addClass('x-topbar-fixed-top'); } else { $('.x-topbar').removeClass('x-topbar-fixed-top'); } }); function topbarOffset() { return $('.x-topbar').offset().top - $('#wpadminbar').outerHeight(); } });Then add this in Custom > Edit Global Css
.x-topbar.x-topbar-fixed-top { position:fixed; width:100%; top:0; z-index:9999; } body .x-navbar.x-navbar-fixed-top { top:46px; }Hope that helps.
August 3, 2016 at 8:44 am #1115389
Raul MParticipantHello there !
Tried but nothing happens 🙁
the Japanese version still having the same problem with the java + css
http://awaodoriparis.com/jp/home-jp-2016/#programmeAnd the French version is working better without (but still not working on the mobile version)
http://awaodoriparis.com/fr/home2016/#programmeMaybe another solution?
Thanks for tryingAugust 3, 2016 at 1:52 pm #1115870
Nabeel AModeratorHi there,
Please add the following code in your Customizer via Appearance > Customize > Custom > Edit Global CSS:
@media screen and (max-width: 979px) { .x-navbar-fixed-top, .x-navbar-fixed-left, .x-navbar-fixed-right { position: fixed !important; top: 0 !important; } .x-topbar.x-topbar-fixed-top { position: relative !important; } }Let us know how this goes!
August 3, 2016 at 9:32 pm #1116565
Raul MParticipantStill not working 🙁
But now the barnav is fixed on the mobileYou can have a look on the JP version (with you modifications proposal). If you click on the first red bouton プログラム on the yellow zone (top of the page) the anchor still arriving too low.
http://awaodoriparis.com/jp/home-jp-2016/
OLD CODE FOUND
I had a look to the Custom > Edit Global Javascript in the Customizer and I found this script you give me last year (I think is to try to resolve the same problem but sorry I can’t understand the code). I erased it to check only with your code… but still not working. I put it again. Maybe you can have a look and tell me if I keep it or not (I think the last part if for another fonction but I don’t know where to cut):jQuery(document).ready(function($) { var $body = $('body'); var $bodyHeight = $body.outerHeight(); var $adminbarHeight = $('#wpadminbar').outerHeight(); var $navbarHeight = $('.x-navbar').outerHeight(); $('.x-nav-scrollspy > li > a[href^="#"], a[href^="#"]').click(function(e) { e.preventDefault(); var $contentBand = $(this).attr('href'); $('html, body').animate({ scrollTop: $($contentBand).offset().top - $adminbarHeight - $navbarHeight + 1 }, 850, 'easeInOutExpo'); }); }); (function($) { if (window.location.hash){ var id = window.location.hash.substring(1); } $(window).load(function() { if (window.location.hash && $( window ).width() > 979 ){ $('html, body').animate({ scrollTop: $('#'+id).offset().top - 100 }, 300); } }); })(jQuery); (function( $ ) { $('.x-portfolio-filters').html('<i class="x-icon-sort"></i> アルバムを選択する'); })( jQuery );I hope you can found a solution for this 🙁
Thanks
RaulAugust 4, 2016 at 12:57 am #1116782
RadModeratorHi there,
That code is only applicable for the navbar, your red buttons are part of the slider. And it’s not even a standard link
<a></a>, it’s just standard layer and linking is executed by javascript.<div class="tp-caption tp-resizeme noSwipe" id="slide-44-layer-17" data-x="['left','left','left','center']" data-hoffset="['-154','-154','-154','-2']" data-y="['top','top','top','top']" data-voffset="['813','813','813','551']" data-width="['500','500','500','1000']" data-height="73" data-whitespace="normal" data-transform_idle="o:1;" data-transform_in="opacity:0;s:1.875;e:Power2.easeInOut;" data-transform_out="opacity:0;s:280;" data-start="0" data-splitin="none" data-splitout="none" data-actions="[{"event":"click","action":"simplelink","target":"_self","url":"http:\/\/awaodoriparis.com\/jp\/home-jp-2016\/#programme","delay":""}]" data-responsive_offset="on" style="z-index: 19; min-width: 366px; max-width: 366px; white-space: normal; font-size: 15px; line-height: 16px; font-weight: 400; color: rgb(255, 255, 255); visibility: inherit; transition: none; border-width: 0px; margin: 0px; padding: 0px; letter-spacing: 0px; min-height: 53px; max-height: 53px; opacity: 1; transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform-origin: 50% 50% 0px;"> </div>The button itself is just text with no links
<div class="tp-caption tp-resizeme" id="slide-44-layer-16" data-x="['left','left','left','right']" data-hoffset="['42','42','42','10']" data-y="['bottom','bottom','bottom','bottom']" data-voffset="['13','13','13','111']" data-fontweight="['800','800','800','700']" data-width="none" data-height="none" data-whitespace="nowrap" data-visibility="['on','on','on','off']" data-transform_idle="o:1;" data-transform_in="opacity:0;s:310;e:Power2.easeInOut;" data-transform_out="opacity:0;s:310;" data-start="0" data-splitin="none" data-splitout="none" data-responsive_offset="on" style="z-index: 18; white-space: nowrap; font-size: 11px; line-height: 16px; font-weight: 800; color: rgb(255, 255, 255); font-family: Raleway; visibility: inherit; transition: none; border-width: 0px; margin: 0px; padding: 0px; letter-spacing: 0px; min-height: 0px; min-width: 0px; max-height: none; max-width: none; opacity: 1; transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform-origin: 50% 50% 0px;">プログラム </div>How about adding those buttons as normal links within text layer? Then add unique class for each link.
Thanks!
August 4, 2016 at 5:17 am #1117060
Raul MParticipantThanks for your explanation.
I think we are arriving to the solution.I create real buttons with links as you propose. And now EVERYTHING is going perfect on my French page (http://awaodoriparis.com/fr/home2016/)
– anchors arrive to the good place on the desktop AND mobile version
– barnav is fixed on the top for the mobile versionBut I can’t understand why on my JP version when I put the same code the solution is not working. Can you please have a (last?) look here please : http://awaodoriparis.com/jp/home-jp-2016/
– anchors DON’T arrive to the good place on the desktop AND NEITHER mobile version
– barnav is OK and fixed on the top for the mobile versionThanks for your help… we are close!
August 4, 2016 at 5:58 am #1117115
Raul MParticipantAH apparently it was a cache problem!
NOW THAT’S WORKING 😀Thanks for all your help
You’re awesome!
Merci beaucoupAugust 4, 2016 at 8:12 am #1117215
JoaoModeratorGlad to hear it Raul
Let us know if we can help with anything else.
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1114824 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
