最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to remove empty <a> line space in navigation menu?

programmeradmin7浏览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?

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?

Share Improve this question edited Aug 2, 2020 at 12:27 mozboz 2,6281 gold badge12 silver badges23 bronze badges asked Aug 2, 2020 at 4:15 EuniceEunice 1
Add a comment  | 

1 Answer 1

Reset to default 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>

发布评论

评论列表(0)

  1. 暂无评论