• 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

RichardKYA

Well-known member
#1
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:

RichardKYA

Well-known member
#3
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.
 

wang

Well-known member
#4
I asked because it is not clear to me what you want to achive. A mock up screenshot will do as well.
 

katsulynx

Well-known member
#5
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.
 

RichardKYA

Well-known member
#6
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.
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...

Code:
.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

:)