[Resolved] Top Bar Alignment for Mobile

Home Forums Support [Resolved] Top Bar Alignment for Mobile

Home Forums Support Top Bar Alignment for Mobile

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2363310
    René

    I have a sandbox site setup for testing here: http://sandbox.tableaux.com/

    How can I set the Top Bar Alignment to “Center” on mobile, but keep it Right aligned on Desktop?

    #2363324
    Ying
    Staff
    Customer Support

    Hi there,

    It looks the top bar alignment is correct.

    But you have this CSS which adds padding to the menu items so it’s a bit off on mobile:

    ol,ul {
     padding-left: 30px;
    }

    Try change it to:

    ol, ul:not(.top-bar ul) {
        padding-left: 30px;
    }
    #2363331
    René

    That worked, but it pushed my primary navigation menu over.

    #2363345
    Ying
    Staff
    Customer Support

    The CSS change should not affect anything outside the top bar.

    And I checked your primary navigation menu, the padding still apply:
    https://www.screencast.com/t/3t17HA1AFq1

    #2363996
    René

    Thanks for checking but it is still pushing the entire navigation to the right. See sceenvidcap:
    [video src="https://tableaux.com/files/video/ScreenRecorderProject2.mp4" /]

    #2364036
    René

    I got it figured out. I took changed the inner header width and then took off that css code altogether and it seems to be working now.

    #2364373
    Tom
    Lead Developer
    Lead Developer

    Glad you got it sorted!

    Another solution would be to make it so your custom CSS only applies to lists inside the content:

    .site-main ol, .site-main ul {
     padding-left: 30px;
    }
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.