[Resolved] Navigation Support for Galaxy Fold & iPhone 5/SE

Home Forums Support [Resolved] Navigation Support for Galaxy Fold & iPhone 5/SE

Home Forums Support Navigation Support for Galaxy Fold & iPhone 5/SE

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1432169
    Fredrik

    Hello,

    I’ve been adding support for Galaxy Fold & iPhone 5/SE to my primary navigation.

    Doing so by removing the 20px padding that the menu items are assigned. Otherwise everything gets smushed.
    See print: https://prnt.sc/uc4jbm

    Adding below CSS works. See print: https://prnt.sc/uc4lj3

    @media (max-width: 414px) {
    	.main-navigation .main-nav ul li a {padding-left: 10px; padding-right: 10px;
    	}	 
    }

    But this causes a problem with the sub-items in the off canvas menu by adding padding-left 10px, I think. See print: https://prnt.sc/uc4m9i

    So any suggestion to structure this better is much appreciated πŸ™‚ Thx!

    #1432301
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the site in question?

    You can edit the original topic and use the private URL field.

    Let me know πŸ™‚

    #1432314
    Fredrik

    Hello Leo,

    Sorry missed that! check it out πŸ™‚

    #1432719
    David
    Staff
    Customer Support

    Hi there,

    so this .main-navigation will target all navigations with that class including the off canvas.

    Instead you can do this to exclude the off-canvas:

    .main-navigation:not(.slideout-navigation)

    #1432796
    Fredrik

    Ah, I see!

    Thanks for the lesson πŸ™‚

    #1432971
    David
    Staff
    Customer Support

    You’re welcome

    #1432975
    Fredrik

    One quick question on the same topic.

    I’m trying to exclude (.slideout-navigation) on this with the same principle:

    	.inside-navigation:not(.slideout-navigation) {
    		padding: 0px 10px; 
    	}

    Maybe that requires a different approach. Thx!

    #1433032
    Leo
    Staff
    Customer Support

    That doesn’t work as .inside-navigation is not at the same level as .slideout-navigation class.

    Try this selector instead:
    .main-navigation:not(.slideout-navigation) .inside-navigation

    #1433041
    Fredrik

    Ahh. Completely missed that, thank you πŸ™‚

    #1433047
    Fredrik

    Can you include .secondary-navigation in the same selector?

    #1433162
    Leo
    Staff
    Customer Support

    It should be something like this if I understand what you are asking correctly:

    .main-navigation:not(.slideout-navigation) .inside-navigation,
    .secondary-navigation .inside-navigation {
        /* CSS here */
    }
    #1433215
    Fredrik

    Hello Leo,

    I see, didn’t know about the ,. Thank you for making it clear πŸ™‚

    #1433226
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

    This is a good site to learn HTML and CSS if you are interested:
    https://www.codecademy.com/catalog/language/html-css

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.