-2

I've an issue with my nav-pill issue is that: nav-pill is not linking to other pages when i click on that it should be go to that page but that thing is not happening.

<ul class="nav nav-pills" data-toggle="collapse" id="head-menu">
    <li><a href="admissions.php">APPLY</a></li>
    <li ><a   href="#">FACULTY</a></li>
    <li ><a href="#">STUDENT</a></li>
    <li ><a   href="#">OFFICES</a></li>
    <li ><a  href="">ALUMNI</a></li>
  </ul>

i tried also tried to echo but didn't work for me.

head part

<!DOCTYPE html>
<html>
<head>

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="footer, contact, form, icons" />

    <link href="https://fonts.googleapis.com/css?family=News+Cycle" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="stylesheet/style.css">
    <link rel="stylesheet" type="text/css" href="stylesheet/slider.css">
    <link rel="stylesheet" href="footer/footer-distributed-with-address-and-phones.css" type="text/css">
    <link href = "bootstrap/css/bootstrap.min.css" rel = "stylesheet">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link href="http://fonts.googleapis.com/css?family=Cookie" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">




    </head>
Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
  • why the php tag? there's no "php" here, just a link to a `.php` page. – Funk Forty Niner Jan 08 '17 at 15:29
  • @Fred-ii- because that page extension is php. this thing works with nav bar but not nav-pills – Muhammad Saad Bhatti Jan 08 '17 at 15:31
  • 1
    so how are you accessing that as, `http://localhost` or directly in your browser as `file:///`? and are you running off a webserver with php installed? – Funk Forty Niner Jan 08 '17 at 15:32
  • i'm running with localhost using XAMPP – Muhammad Saad Bhatti Jan 08 '17 at 15:33
  • check for errors then, use error reporting. Look at your html source, what does it reveal? – Funk Forty Niner Jan 08 '17 at 15:33
  • I think you need to add to head tag `base`: e.g.`` – Banzay Jan 08 '17 at 15:38
  • https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base – Banzay Jan 08 '17 at 15:38
  • this could also be a js/css issue; look at your developer console. what you have now is bootstrap syntax. Make sure all necessary libraries are loaded. JS might not be loaded and jquery. I'm betting on non-loaded js/jquery. – Funk Forty Niner Jan 08 '17 at 15:39
  • @Fred-ii- this thing is showing when i load the page `jquery-1.11.3.min.js:7 Uncaught TypeError: $(...).lightGallery is not a function at jquery-1.11.3.min.js:7 (anonymous) @ jquery-1.11.3.min.js:7` – Muhammad Saad Bhatti Jan 08 '17 at 15:45
  • there you go and as I suspected; jquery isn't loaded, or it's not in the right location and is being overwritten somewhere. jQuery is required to run bootstrap and nav's – Funk Forty Niner Jan 08 '17 at 15:46
  • @Fred-ii- now i picked javascript online. javascript loading issue resolve but page still didn't link – Muhammad Saad Bhatti Jan 08 '17 at 15:48
  • visit the bootstrap site http://getbootstrap.com/ download the entire package, put it on your pc and run an example from in there. I will guarantee you it will work. Once you get that example going, work with a php test file with a few php directives with `.php` ext. of course and you will get success. Just make sure of your paths being correct. – Funk Forty Niner Jan 08 '17 at 15:50
  • @Fred-ii- linking working in navbar but not in nav-pill – Muhammad Saad Bhatti Jan 08 '17 at 15:51
  • 1
    Did you wrap `` in a `
    `? example http://www.tutorialrepublic.com/codelab.php?topic=bootstrap&file=pills-nav and putting in the url/page for it. Also http://stackoverflow.com/a/27854348/ try adding "role", i.e.: `
  • ` to `
  • `. Not much else I can do for you here, except setup an entire folder to test it and I don't have much time for it, TBH.
  • – Funk Forty Niner Jan 08 '17 at 16:10
  • Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackoverflow.com/rooms/132639/discussion-on-question-by-muhammad-saad-bhatti-nav-pills-link-issue-not-linking). – Bhargav Rao Jan 08 '17 at 18:16