Tried custom css to make the top menu appear in mobile devices but failed. Can you please help me out? Here is my website link emperorpost.com
Thanks in advance
Hi,
The top menu will not be displayed on mobile, it is not supposed to display. It can be made to appear. I see that you already made some modifications. Try adding a code like this
– https://www.screencast.com/t/EEsOvws2iD
It may require additional modifications. I see that you are also using an AMP implementation for your website on mobile. That could also interfere with the top menu, and how it will display, if you choose to make it visible.
@media (max-width: 767px) {
.td-header-style-8 .td-header-top-menu {
display: block;
margin-left:auto;
width:auto;
}}
Thanks
Hi,
Please try it like this and the top menu should be displayed
– https://www.screencast.com/t/eR5De12bRr7
@media (max-width: 767px){
.td-header-top-menu-full,
.td-header-sp-top-menu {
display:block!important;
float: none!important;
text-align:center;
}}
It will not be displayed in the AMP page, that is a totally different page not controlled through the theme.
Thanks
Hi,
The same menu items that are displayed on desktop will be displayed on mobile as well. That is the same menu top menu. You could maybe hide the menu items on desktop with CSS and display them only on mobile, if you should consider this a solution.
Like this for example
– https://www.screencast.com/t/SOEwtxnA
– https://www.screencast.com/t/XMNwhLmg
– https://www.screencast.com/t/QTalRaQ7X1
This code will hide menu items on anything larger then phones, based on the unique ID each menu item has.
@media (min-width: 767px) {
#menu-item-50 {
display: none;
}}
Thanks
Would the opposite work? For example the Social Icons, log in are part of the side full menu on a mobile, so I do not need those to show up on the top header menu? Thanks
Hi,
@marcomediastudio The social icons and the login in the top menu can be disabled in the theme panel, if they are not required in the top bar
– https://forum.tagdiv.com/top-bar-templates/
Please correct me if I misunderstand.
Thanks
Looking at removing those options on the mobile version since I added the top menu on mobile
Hi,
That would require you to modify the theme files. This is the file where you could remove the socials and login displayed in the mobile menu
– https://www.screencast.com/t/mUg8rhrQ
Comment or remove the code responsible and check the results.
Thanks
Thanks Simion….I am a newbie and don’t feel too comfortable in touching the PHP files, is there no way to just make a change to the Custom CSS files in case i want to bring back some day, or is this the only way? Thanks
Hi,
A code like this will remove the socials and login from the mobile menu
– https://www.screencast.com/t/mEvrihEd7g
Enter it in Theme panel->Custom CSS section
.td-menu-socials,
.td-menu-login-section {
display: none;
}
Thanks
Hi,
The code should work just fine. I have tested it again on the live demo.
Before code – https://www.screencast.com/t/NF2XG7bhum
Code applied – https://www.screencast.com/t/vJiEvuef1J
Try clearing your cache after entering the code. If you could provide a link to your website I will inspect it and see why the code is not working.
Thanks