1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Dropdown menus

Discussion in 'Styling and Customization Questions' started by RichardKYA, Feb 3, 2016.

  1. RichardKYA

    RichardKYA Well-Known Member

    Is there a way to have dropdown menus open upwards instead of dropping down?

    I've created a bottom navbar, so I need them to open upwards if possible?

    Thank you :)
    Last edited: Feb 3, 2016
  2. wang

    wang Well-Known Member

    What do you mean by upwards? Can you please screenshot it?
  3. RichardKYA

    RichardKYA Well-Known Member

    I would screenshot it, but it's not working how I want, so I can't really screenshot anything at the moment.

    Basically, I want the dropdown menus to open upwards instead of dropping down. Usually the menu drops open below the link, I would like it to open up above the link.
  4. wang

    wang Well-Known Member

    I asked because it is not clear to me what you want to achive. A mock up screenshot will do as well.
  5. katsulynx

    katsulynx Well-Known Member

    There's no default way. You have to alter the XenForo.js to achieve it, best by creating a new function linked to a similar but different class.
  6. RichardKYA

    RichardKYA Well-Known Member

    I would do, but I'm not that great with js.

    I did have a little scan through the xenforo.js though and if I understand it correctly, it checks to see if there is enough space for the menu to drop down into and if not, it adds a class "BottomControl", which I believe makes the menu open upwards, well, it appears to anyway lol

    For now, I've kind of got things working how I want by adding a class to the relevant elements and putting this in my css...

    .bottom-menu {
    top:initial !important;
    bottom: 50px !important;
    ..it seems to be working for the most part, but it's a bit intermittent, more so on mobiles. That said, it will do for now until I can achieve something better


Share This Page