html - Bootstrap 3 Horizontal Nav adding anchor -


getting off behaviour bootstrap horizontal navigation, reason seems adding anchor link first <li><!-- here --></li> element.

code:

<li class='submenu'> <a href='#'>      <img src='{{ url::asset('img/menu/performance.png') }}' /> performance          <ul class='nav'>     <li><a href='#'>abc</a></li>     <li><a href='#'>abc</a></li>     <li><a href='#'>abc</a></li>     <li><a href='#'>abc</a></li>      </ul> </a>                     </li> 

what chromes inspector says:

<li class="submenu"> <a href="#">     <img src="https://xxxxxx/img/menu/performance.png"> performance      </a>     <ul class="nav" style="display: block;"><a href="#">         </a><li><a href="#"></a><a ref="#">abc</a></li>         <li><a href="#">abc</a></li>         <li><a href="#">abc</a></li>         <li><a href="#">abc</a></li>     </ul> </li> 

any 1 got idea's of why happening? hacky fixed following css:

.left-nav .submenu li:nth-child(2) > a:first-child {      display:none; } 

you should not have links inside link. not valid html.

if browser encounters link tag while inside link tag add closing tag first link.


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -