Because the href is relative to the current page. Use url tag of django
templates. That will solve your problemo.

On Mon, Jul 8, 2019, 9:20 PM Surya Adhikari <itsme.sury...@gmail.com> wrote:

> my nav menu have 2 menus :
> Home ,  Search Names
>
> ie. from index page when i click student from Sub menu of Search names  ,
> it will redirects search.html after
> if i click again teacher from search.html it will redirects to
> search.html/ search1.html rather then search1.html only.
>
> it works normal only from index page.
>  i am inheriting the nav menu from index page to all of other pages.
> what am i doing wrong ?
>
> <div class="topnav">
>
>   <a href="">Home</a>
>
>   <div class="dropdown">
>     <button class="dropbtn">Search Names
>       <i class="fa fa-caret-down"></i>
>     </button>
>     <div class="dropdown-content">
>       <a href="search">student</a>
>       <a href="search1">teachers</a>
>       <a href="search2">non teaching</a>
>      </div>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3bf58350-5f27-4b88-b803-1694ada2d6a6%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/3bf58350-5f27-4b88-b803-1694ada2d6a6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMKMUjvtuAgT9LjRzb89LpPWnFq5wru4K6SGsVbaVhWjOr3XjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to