WordPress.org

Forums

[resolved] Navigation keeps "jumping" to next line? (7 posts)

  1. j4ze
    Member
    Posted 2 years ago #

    For some reason, my navigation-bar keeps jumping to next line, when i resize my browser window. Even though there is plenty of space before "hitting" the logo.

    My site is here: http://selectedbloggers.cphadsdemo.dk

    I've tried with display: inline-block, position: relative and a lot of other things found by searching the interwebs and this forum, but nothing seems to get the job done :(

  2. martcol
    Member
    Posted 2 years ago #

    You have 64px top padding on this element:

    #menu-container

    When you reduce the size of the browser it pushes that down and the padding then, is too much.

    A media query could sort that.

  3. j4ze
    Member
    Posted 2 years ago #

    I appreciate your answer, martcol, but my problem is when i resize the width of the browser - so i dont think it has something to do with the top padding. The reason for the top padding is so that the navigation will stay at the bottom of the header.

  4. Andrew Nevins
    Forum moderator
    Posted 2 years ago #

    Looks like your issue is with using floats; floated elements will naturally drop below one another when there isn't enough room for them to sit aside.

    Which theme are you using?

  5. j4ze
    Member
    Posted 2 years ago #

    Im using a custom theme called photolux. Would it be better to drop the floating left and right and maybe just display: inline-block; on the two elements?

  6. Andrew Nevins
    Forum moderator
    Posted 2 years ago #

    You can get away with not floating the menu container at all, just keeping the logo container floated left. You may also need to get rid of the width set in the menu container.

  7. j4ze
    Member
    Posted 2 years ago #

    Thank you Andrews! I simply removed float and width from the menu-container and kept float:right on the logo-container, so now i works like a charm :D

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.