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

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

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