Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Menu intermittently rendering mobile menu incorrectly.

Explorer ,
Mar 03, 2017 Mar 03, 2017

Copy link to clipboard

Copied

Hi guys,

I have a responsive menu on my site. I recently made the mobile version of the menu with position:fixed; so it stays along the top of the site when the user scrolls.

However, for some strange reason, when viewing the site on a mobile (I think just on iPhone), on the homepage, the text and spacing on the expanded menu appears bigger than it should. This happens intermittently though and not every time which is strange - maybe it's a Javascript conflict?

Please see attached screenshots to see what I mean.

This is how it should appear...

menu_small.jpg

...and this is how it sometimes appears...

menu_big.jpg

You can view the site (Link removed by Mod)

Thank you very much guys, hoping you can help me get to the bottom of this!

SM

Views

922
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 07, 2017 Mar 07, 2017

You may also want to add in the following css to the top of your stylesheet to normalize the text on iphones...

* {

     -webkit-text-size-adjust:none;

}

That will stop the iphone from using its own algorithm to make text more readable and allow you to set your sizes through css with more complete control.

Votes

Translate
Community Expert ,
Mar 03, 2017 Mar 03, 2017

Copy link to clipboard

Copied

Assuming that the link that has vanished read Professional Live Music Agency - Tailored Entertainment  then this could be the problem.

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>

This will prevent resizing.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 03, 2017 Mar 03, 2017

Copy link to clipboard

Copied

Hi BenPleysier,

Thank you very much for the reply - admin removed the link for some reason...

I updated that line so it now reads:

<meta name="viewport" content="width=device-width, initial-scale=1">

...but the same issue appears.

Can you suggest anything else?

Thank you again, really appreciate your help.

SM

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2017 Mar 03, 2017

Copy link to clipboard

Copied

This is what I get on an iPhone

Are you using an actual phone or a simulated phone?

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 03, 2017 Mar 03, 2017

Copy link to clipboard

Copied

Hi BenPleysier,

Thank you for the reply.

That's the one and that looks fine - however, the issue is when you expand the menu; sometimes it appears like my first screenshot (in original post), like how it should. Then if you refresh the page and expand the menu, the text and menu items appear more spaced, like the second screenshot.

Yes, we are using an actual phone and not simulating it.

If you have any thoughts or suggestions please let me know!

Thank you very much,

SM

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2017 Mar 03, 2017

Copy link to clipboard

Copied

You might want to clear out your memory & cache.

http://www.macworld.co.uk/how-to/iphone/how-clean-ios-iphone-ipad-junk-files-temporary-files-cache-i...

Follow these steps to clear out the Safari cache:

  1. Press Settings > Safari.
  2. Scroll down and tap Clear History and Website Data.
  3. Tap Clear History and Data.

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 07, 2017 Mar 07, 2017

Copy link to clipboard

Copied

Hi Nancy,

Thank you for the helpful suggestion. However, after clearing the Safari cache, the menu issue remains...

SM

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2017 Mar 07, 2017

Copy link to clipboard

Copied

Run the validator at http://validator.w3.org/nu

You will see there are some issues with your meta tags. The corrected viewport meta tag you added is missing a closing quote, that can cause display issues.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2017 Mar 07, 2017

Copy link to clipboard

Copied

You may also want to add in the following css to the top of your stylesheet to normalize the text on iphones...

* {

     -webkit-text-size-adjust:none;

}

That will stop the iphone from using its own algorithm to make text more readable and allow you to set your sizes through css with more complete control.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 08, 2017 Mar 08, 2017

Copy link to clipboard

Copied

LATEST

Thank you so much Jon, you're a star - you've cracked it

Also, thank you for pointing out the issue with the meta tag, much appreciated.

Thank you Jon and thank you everybody else for all your informative and helpful responses.

Best wishes,

SM

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines