- This topic has 9 replies, 3 voices, and was last updated 1 year, 9 months ago by
Leo.
-
AuthorPosts
-
September 24, 2020 at 5:34 am #1456797
Ho
Hello,
I am having a few questions about moving the bottom-position in the mobile header.
Here is the url —- and the header currently looks like the following pictures.
What I tried to do is that:
1. Moving the “Site Title” to the center.
2. Moving the toggle to the left.
3. Create a link for users login with font awesome icon (fa-user / something else) at the right-side of the header(like the following picture)
I tried that for quite a while but I have no any clue π Please give me some guide.
Thank you very much.
September 24, 2020 at 6:55 am #1456883David
StaffCustomer SupportHi there,
first lets add the icon to your mobile header.
You can use a Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/to insert your icon/link HTML.
Set the Hook to Inside Mobile Header.
Once thats done let me know and ill look at the CSS required to re-order the title/menu/icon.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 24, 2020 at 9:39 am #1457309Ho
Thank you so much for your kindly response and giving me the guide.
I have insert <i class=”fa fa-user” aria-hidden=”true”></i> to generate_inside_mobile_header (Element Tope=Hook). Currently the header looks like the following picture.
I am not sure if this step was done correctly. Please let me know if there is something goes wrong. The icon is showing on the header of url —– now.
Thanks!
September 24, 2020 at 10:07 am #1457356Leo
StaffCustomer SupportLooks good to me.
Try this CSS:
.mobile-header-navigation .fa-user { order: 2; color: #ffffff; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 24, 2020 at 10:40 am #1457408Ho
It works!!
September 24, 2020 at 2:41 pm #1457670Leo
StaffCustomer SupportGlad to hear π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 24, 2020 at 7:43 pm #1457818Ho
Updated: The layout looks good with using the following CSS
/* 767px and below screen sizes */ @media (max-width:767px){ #mobile-header .inside-navigation a{ display: contents; } /* Menu toggle */ #mobile-header a .menu-toggle{ order: 1; position:absolute; left:0px; padding-left:30px; padding-right:30px; } #mobile-header .inside-navigation .navigation-branding{ order: 2; margin:0px; } .mobile-header-navigation .fa-user-circle{ order: 3; color: #ffffff; position: absolute; right: 0px; width: 71px; } }
However, since I tried to make the icon “fa fa-user-circle” clickable, I have inserted
<a href="-----/">
before<i class="fa fa-user-circle" aria-hidden="true"></i>
in generate_inside_mobile_header. The result is that the toggle (menu) and user-icon are both linking to the login page.May I ask is there another code I need to insert into the element-hook in order to keep “toggle” as a menu?
Thanks
September 25, 2020 at 2:42 am #1458166David
StaffCustomer SupportYou need to close the
</a>
tag you have added to the icon.eg.
<a href="https://m5music.hk/login/"><i class="fa fa-user-circle" aria-hidden="true"></i></a>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 25, 2020 at 9:56 am #1458864Ho
I am very glad that you told me something what I didn’t know before, and guided me step by step to achieve the issues. I really learned something here.
Thanks all of your help. The problems were solved. Appreciate!
September 25, 2020 at 9:57 am #1458868Leo
StaffCustomer SupportGlad we could help π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.