- This topic has 16 replies, 2 voices, and was last updated 4 years, 6 months ago by David.
-
AuthorPosts
-
October 13, 2019 at 4:36 pm #1033783Uroš
Hello, i just cant seem to find any solution for my header to position my menu in center. Im looking for something similar like Casper did with their header: https://casper.com/home/
I would also like to recreate their mobile menu but it seems like it’s impossible with generate press. I hope i’m mistaken and someone will help me out. 🙂
I also use elementor pro
October 14, 2019 at 6:05 am #1034124DavidStaffCustomer SupportHi there,
can you remove the coming soon on your site so i can see your current setup ?
October 14, 2019 at 7:18 am #1034199UrošOkay i did it 🙂
October 14, 2019 at 7:54 am #1034337DavidStaffCustomer SupportWith your current set-up – first you will need to setup woocommerce so as the cart icon displays. Then add this CSS:
@media (min-width: 769px) { .inside-header, .main-navigation ul { display: flex; } .main-navigation { flex: 1; } .main-navigation ul li:first-child, .main-navigation ul li.wc-menu-item { margin-left: auto; } }
October 14, 2019 at 11:54 pm #1034839UrošI did what you said but i got cart text instead of icon. And the css is not changing anything :/
October 15, 2019 at 2:30 am #1034968DavidStaffCustomer SupportYou can enable the Cart Icon in Customizer > Layout > Woocommerce.
October 15, 2019 at 7:38 am #1035179UrošI do have enabled cart.. but it’s not showing up in menu it’s probbably bugged out or something
October 15, 2019 at 7:47 am #1035194DavidStaffCustomer SupportDo you have the Woocommerce shop and products set up? Currently i cannot access the shop to add any products to see what the issue may be.
October 15, 2019 at 7:49 am #1035282UrošWow it really does not even show shop.. hmm probably there is a problem with my woocommerce installation
October 15, 2019 at 8:48 am #1035369UrošOkay i fixed everything but it still does not center it on header width because it center it between logo and cart.. I want that menu is perefectly centered inside header
October 15, 2019 at 12:18 pm #1035594DavidStaffCustomer SupportCan you go to customizer > layout > header and enable Navigation as Header and remove the CSS i provided above. May be an easier solution.
October 15, 2019 at 12:32 pm #1035604UrošThat does not center primary navigation haha
October 15, 2019 at 2:43 pm #1035671DavidStaffCustomer SupportNo – but if you can enable it then i can look at what CSS is required.
October 15, 2019 at 11:02 pm #1035875UrošOh okay. I enabled it so you could try it now 😛
Btw can i ask you where i could learn something about css so i could update my website by my self in future..?
October 16, 2019 at 5:00 am #1036060DavidStaffCustomer SupportTry this CSS:
@media (min-width: 769px) { .navigation-branding, .main-navigation ul li.wc-menu-item, .main-navigation ul li.search-item { position: absolute; } .navigation-branding { left: 0; } .main-navigation ul li.wc-menu-item { right: 60px; } .main-navigation ul li.search-item { right: 0; } .main-navigation .inside-navigation { justify-content: center; } }
Learning CSS is as much about learning browser dev tools and HTML.
Good place to start with Dev tools for CSS:https://developers.google.com/web/tools/chrome-devtools/css
Then checkout W3 Schools they cover and provide examples of all CSS properties.
-
AuthorPosts
- You must be logged in to reply to this topic.