0

I have a custom link(user manual) going on in my navigation menu. I leave the original <a> empty and link a automatically download pdf under navigation label area.

Now my menu has an empty space left. How do I remove it?

enter image description here

0

it's hard to answer without seeing the HTML and CSS, but from your description the behaviour is correct. If you don't want the anchor tag to take up any visible room, you should give it a display:none. If you can edit the markup you could either add a class like this

<a href="#" class="hidden"></a> with this css in your stylesheet:

.hidden {
  display: none;
}

or you could do an inline style (although not good practice) <a href="#" style="display: none"></a>

2
  • Thanks for your answer. Unfortunately this is not what I meant. I insert the link under navigation label area instead of the URL area. I attached with a screenshot for better understanding – Eunice Aug 3 '20 at 3:26
  • Hello Eunice, I think you would have to attach a screen shot of the administrative view in order to explain. I don't recognise "navigation label area" and "URL area". When working with menus in Wordpress the end result are anchor tags in the front end HTML. And if an HTML anchor tag is empty it will in most cases still take up some space unless there is CSS to tell it otherwise. – leanderl Aug 8 '20 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.