- This topic has 8 replies, 3 voices, and was last updated 3 years, 12 months ago by Tom.
-
AuthorPosts
-
April 23, 2020 at 1:28 pm #1252110Lukasz
Hi,
I have a minor issue with header hover effect. I’ve implemented below code but a line under category menu doesn’t cover whole width of a name for instance you have name CATEGORY but line covers only ATEGOR part. I hope that I am explaining it enough clear..main-navigation .menu > .menu-item > a::after { content: ""; position: absolute; right: 0; left: 50%; bottom: 15px; -webkit-transform: translateX(-50%); transform: translateX(-50%); display: block; width: 0; height: 2px; background-color: currentColor; transition: 0.4s width ease; } .main-navigation .menu > .menu-item.current-menu-item > a::after, .main-navigation .menu > .menu-item > a:hover::after, .main-navigation .menu > .menu-item.sfHover > a::after { width: 50%; }
April 23, 2020 at 2:16 pm #1252154LeoStaffCustomer SupportHi there,
What if you increase the
width: 50%;
style?April 25, 2020 at 6:31 am #1254903LukaszI have the question beyond the scope. Is there any possibility to view my topics on the forum? I don’t see a option in my account.
In terms of the question it shows line under the menu. I would like to have a line width hover effect proportionally to width of a letters size as you can see on the image (right now the width is proportional to total width of item header I’am guessing)
.main-navigation .menu > .menu-item.current-menu-item > a::after, .main-navigation .menu > .menu-item > a:hover::after, .main-navigation .menu > .menu-item.sfHover > a::after { width: 50%; }
April 25, 2020 at 9:03 am #1255227LeoStaffCustomer SupportIs there any possibility to view my topics on the forum?
You can do so by clicking your name link:
https://www.screencast.com/t/QRaTXdHc0Shouldn’t changing it to 100% work?
April 25, 2020 at 10:45 am #1255356LukaszAfter changing to 100% the line is too length. This is size of element menu, but I’d like to have size of string. My full CSS code on that is
@media (min-width: 769px) { .main-navigation .menu > .menu-item > a::after { content: ""; position: absolute; right: 0; left: 50%; bottom: 15px; -webkit-transform: translateX(-50%); transform: translateX(-50%); display: block; width: 0; height: 2px; background-color: currentColor; transition: 0.4s width ease; } .main-navigation .menu > .menu-item.current-menu-item > a::after, .main-navigation .menu > .menu-item > a:hover::after, .main-navigation .menu > .menu-item.sfHover > a::after { width: 100%; } } /*End GeneratePress Site CSS */
This is strange but in my account my nickname isn’t clickable as you can see on the attachment (black nickname) but on your attachment it is (blue nickname). I don’t know why.
April 25, 2020 at 5:49 pm #1255739TomLead DeveloperLead DeveloperYou should just be able to do this:
.main-navigation .menu > .menu-item > a { border-bottom: 1px solid transparent; } .main-navigation .menu > .menu-item.current-menu-item > a, .main-navigation .menu > .menu-item:hover > a, .main-navigation .menu > .menu-item.sfHover > a { border-bottom: 1px solid #000; }
Let me know ๐
April 26, 2020 at 2:28 am #1256069LukaszNice effect, but the line should have length of a name as you can see on the images (before and after)
April 26, 2020 at 9:38 am #1256626LukaszAfter wondering I am happy with the happy solution. No need to make any other effort. Thanks for helping.
April 26, 2020 at 10:06 am #1256669TomLead DeveloperLead DeveloperNo problem! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.