Responsive issue and split menu issue

Hi,
I would have three problems to solve:

1 - by consulting the mobile site, some elements are not resized in a responsive mode and there is no margin with the sides of the site (images attached).

2 - Still on a cell phone mode, I would like the menu remain always visible rather than disappearing when the page is scrolled.

3 - I would like the menu, if the resolution is small, resize the text rather than split into two lines.

How can I do?

Thanks and good job

P.s. if it should be useful, I leave the credentials for access to the site with in a secure note.

  1. You have adjusted the padding in desktop mode and this is skewing the mobile version.
    Eg: Title text is set to 4.6em - should be set to 2.6em to fit on the mobile screen.
    Eg 2: Change the padding on the circular green lime photo to “padding: 20px 20px 20px 25px;” to center it on screen.
    You need to optimise for mobile devices. This is a fact of web design.
    See answer 3.

  2. Seek out custom development from a professional to achieve this.

  3. Use @media queries to achieve this.

Disclaimer: I am not affiliated with apex support. I am just trying to help :slight_smile:

Hey @solid7d,

  1. You will need to use the Responsive Text feature. For more details, please see the Responsive Text section in Cornerstone Settings documentation.

  2. This is not possible in X but is possible in Pro. Achieving this in X would require custom development which is outside the scope of our support so I’d recommend that you upgrade to Pro for this project.

  3. We can help you reduce the size of the text in the menu but you have lots of menu items and resizing them to fit one line would mean sacrificing readability of the text. Your current setup is not recommended because it only looks fine on a 4k display. You will need to redesign your menu for this or rethink what menu items are essential to be included in your menu.

Thanks.

Perfect @christian_y,
I solved point 1 with the solution you gave me.
For point 2 ok, I will consider switching to Pro.
On point 3 I know you’re right: too many items on the menu, no doubt! but the customer does not intend to decrease the number of entries and would like the menu to adapt automatically reducing the size of the text if needed.
Could you please kindly tell me how to make the menu responsive?

Thanks and have a good day.

Hi again,

I spent some time on your site trying to make the current menu responsive, as you have many menu items, this requires a lot of media queries to handle the menu on every possible screen which is not recommended at all. I’ll show how it looks on the last break-point before the mobile menu appears (see screenshot)

As you see I had to remove all the spacing and decrease font size to adjust the menu in one line and it doesn’t look good. I’d recommend you to enable the mobile menu on desktop as well to handle such menu. To do this just add the following code in the Theme Options > CSS:

@media screen and (max-width: 2000px) {
  a.x-btn-navbar {
    display: block;
    float: right;
  }

  nav.x-nav-wrap.desktop {
    display: none;
  }
  .x-nav-wrap.mobile:not(.x-collapsed) {
    display: block !important;
  }
}

Hope this helps!

Hi,
I really hoped there was a way to make responsive the menu that resized itself as responsive text… there is really no solution?
However, I tried to put the menu as in the mobile view but it doesn’t work: when I click a menu item I’m not brought to the right position and the menu is not hidden after the click and I have to manually close it.
How can I do?

Thank you

Hi again,

Regretfully there is no good way to accommodate such menu or make it responsive without disturbing the layout. To fix the mobile menu you can add the following code in the Theme Options > JS:

jQuery(document).ready(function($) {

  var $body                = $('body');
  var bodyHeight           = $body.outerHeight();
  var adminbarHeight       = $('#wpadminbar').outerHeight();
  var navbarFixedTopHeight = $('.x-navbar-fixed-top').outerHeight();
  var locHref              = location.href;
  var locHashIndex         = locHref.indexOf('#');
  var locHash              = locHref.substr(locHashIndex);
  var dragging             = false;
  
  $body.on('touchmove', function() {
      dragging = true;
  } );
  
  $body.on('touchstart', function() {
      dragging = false;
  } );


  //
  // Calculate the offset height for various elements and remove it from
  // the element's top offset so that fixed elements don't cover it up.
  //

  function animateOffset( element, ms, easing ) {
    $('html, body').animate({
      scrollTop: $(element).offset().top - adminbarHeight - navbarFixedTopHeight + 1
    }, ms, easing);
  }


  //
  // Page load offset (if necessary).
  //

  $(window).load(function() {
    if ( locHashIndex !== -1 && $(locHash).length ) {
      animateOffset(locHash, 1, 'linear');
    }
  });


  //
  // Scroll trigger.
  //

  $('a[href*="#"]').on('touchend click', function(e) {
      console.log($('.hm1.x-bar-fixed').outerHeight());
    href        = $(this).attr('href');
    notComments = href.indexOf('#comments') === -1;
    if ( href !== '#' && notComments ) {
      var theId = href.split('#').pop();
      var $el   = $('#' + theId);
      if ( $el.length > 0 ) {
        e.preventDefault();
        
        if (dragging) {
            return;
        }
        $('.x-nav-wrap.mobile').addClass('x-collapsed').attr("aria-hidden", true);
		$('.x-btn-navbar').addClass('collapsed').attr({"aria-selected": false,"aria-expanded": false});
		$('.x-btn-navbar').click();

        animateOffset($el, 850, 'xEaseInOutExpo');
      }
    }
  });
});

Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

Hi,
I added the js code but now it is no longer visible the menu mobile mode… I also tried to delete the js code and the css and put them again but nothing, I see the menu in normal mode.
Can you help me?
In the first post I put the credentials for access to the site, I think maybe it’s faster if you worked directly, right?

Thanks

Hi again,

I just checked your site and I see the mobile button is displaying fine on my end (see screenshot)

This could be related to your browser’s cache, try clearing out the browser’s cache and see if this works.

I also tested the mobile closing and positioning issue and it’s working fine too.

Cheers!

Hi,
I had already deleted the cache, as I always do, and I tried again but nothing. I also tried the hidden mode and it doesn’t work. I also tried to change browser (Firefox and Edge) but nothing.
Reading the code I think I understand the problem … my screen has a resolution of 2560x1440 pixels and in the CSS code there’s a limit of 2000 pixels, right?

@media screen and (max-width: 2000px) {
a.x-btn-navbar {
display: block;
float: right;
}

nav.x-nav-wrap.desktop {
display: none;
}
.x-nav-wrap.mobile:not(.x-collapsed) {
display: block !important;
}
}

If this is the problem, how much I can increase the value of max-width?

Thanks

Hi @solid7d,

That CSS displays the mobile menu and hide the desktop menu in 2000px screen width. If you’ll change that to 2560px then you’ll see the mobile menu on that size too. If that’s correct and what you’re trying to achieve, then, you may change 2000px to 2560px too.

It’s responsive, your menu just has too many items that screen can’t handle. Every item has a minimum width for readability.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.