- This topic has 23 replies, 3 voices, and was last updated 3 years, 7 months ago by Tom.
-
AuthorPosts
-
September 4, 2020 at 7:20 pm #1431377ElvinStaffCustomer Support
But doing so causes another problem. When the close button is aligned to the left it covers the text once again.
I was gonna suggest to add padding or margin to either left or right side of your search input area depending on where you put it so it has “space” for the close button.
I’ve checked your site again to find the CSS selector to do the job but you seems to have already found it and actually added a padding. Nice job, it looks good now.
So I guess some more dev is needed to fix this. Definitely a tough one for something so light.
Thanks, we’ll look into it.:)
September 4, 2020 at 7:30 pm #1431386FredrikAh I see! but your suggestion got me going in the right direction π so thx for that. I never touched CSS before so it’s not clear really what I’m doing. I’m more familiar with C# and game dev.
So I did this,
/* move active search box "X" to left */ li.search-item.active { position: absolute !important; } /* change background of search window & add shadow */ .navigation-search.nav-search-active { background: #000000; - /* supposed to be black, opacity that needs removing? */ box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.05); } /* move search cursor position left desktop */ .navigation-search input { padding-left: 70px; } /* move search cursor position left mobile */ @media (max-width: 768px){ .navigation-search input { padding-left: 50px; }
Feel free to add suggestions or improvements. Once again thx!
September 4, 2020 at 7:37 pm #1431390ElvinStaffCustomer Support/* move search cursor position left desktop */ .navigation-search input { padding-left: 70px; } /* move search cursor position left mobile */ @media (max-width: 768px){ .navigation-search input { padding-left: 50px; }
Looks good. That’s pretty much what I was gonna add.
No problem. Glad to be of any help. π
September 4, 2020 at 8:12 pm #1431409FredrikNice!
One thing always leads to another…
So when moving the active search box “X”, it also moves the Woo Cart to the left on toggle. I noticed this when I changed the colours back the way I liked.
I tried #FFF to mask it, but then flickering occurred. Think this has to do with the fact that the Woo Cart jumps to the left faster than the search window opens.
/* move active search box "X" to left */ .main-navigation li.close-search { position: absolute !important;
I guess this has something to do with how the menu was structured. When we toggle/remove the .search-item from order:2 the Woo Cart takes its place.
#menu-test-site-menu { display: flex; } .slideout-toggle { order: 1; } .search-item { order: 2; margin-right: auto; } .wc-menu-item { order: 3; } }
Some way we could always make each menu item stay put? π
September 5, 2020 at 10:06 am #1432164TomLead DeveloperLead DeveloperHi there,
I’m not sure I’m seeing the issue – where should I be looking, exactly?
September 5, 2020 at 10:46 am #1432200FredrikHello Tom,
I forgot to update sorry. I changed to this (CSS below), and that fixed the woo cart moving to the left π
#menu-test-site-menu { display: flex; } .slideout-toggle { order: 1; } .search-item { order: 2; } .wc-menu-item { order: 3; margin-left: auto; } }
I changed it back so you can see the problem. Once again thx!
September 5, 2020 at 1:58 pm #1432328TomLead DeveloperLead DeveloperThat
margin-left: auto;
on the.wc-menu-item
class is the perfect solution πSeptember 5, 2020 at 2:06 pm #1432332FredrikPerfect π Thank you for all your help & guidance!
September 6, 2020 at 9:56 am #1433062TomLead DeveloperLead DeveloperNo problem! π
-
AuthorPosts
- You must be logged in to reply to this topic.