So I’m working on a my personal portfolio after years that I haven’t touched coding in any form since I graduated from school, so kind of hard remembering my skills.
I’m using wordpress with Elementor PRO
and I’m changing a particular “a class” inside the nav that I would like to be able to recreate the design I proposed myself, somebody could give me a hint on how to make the hover on the a to have a type of border without the use of text-decoration under?
Hi mysucsgo, Welcome to Sitepoint!
(An alert banner told me you were new here )
There may be a newer/better way to do this that I’m not aware of.
I’ll show you how it can be done with a pseudo ::after element on the anchor.
Doing it this way you will be able to position the gold bottom underline anywhere under the text that you want it. I got as close to your sample image as I could.
wouldn’t work cause u just get a border under based on ur section, the first one reported over its exactly what I meant but forgot how to do ^^.
thanks for the help tho.
Adding a border that was not previously there would alter the size/layout of the element, resulting in a layout shift which could cause problems or be visually awkward.
If you were to use a border, it would initially be there, but made invisible by matching the background colour, then changing the border-color on hover.