0

I want to change the links in my bootstrap theme's navbar to go from sliding on same page to opening new HTML pages. Here's the code after I swapped #links with .HTML links. Can someone tell me what else I need to change before the links actually start working? Thank you.

 <head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Here is Title</title>
<meta name="description" content="Here is description">
<meta name="keywords" content="content is here">

<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Pinyon+Script" rel="stylesheet">
<link rel="stylesheet" href="css/styles-merged.css">
<link rel="stylesheet" href="css/style.min.css">

<!--[if lt IE 9]>
  <script src="js/vendor/html5shiv.min.js"></script>
  <script src="js/vendor/respond.min.js"></script>
<![endif]-->

   <!-- Fixed navbar -->

<nav class="navbar navbar-default navbar-fixed-top probootstrap-navbar">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="index.html" title="uiCookies:FineOak">FineOak</a>
    </div>

    <div id="navbar-collapse" class="navbar-collapse collapse">
      <ul class="nav navbar-nav navbar-right">
        <li class="active"><a href="#" data-nav-section="welcome">Home</a></li>
        <li><a href="cat1.html" data-nav-section="cat1.html">Category One</a></li>
        <li><a href="cat2.html">Category Two</a></li>
        <li><a href="cat3.html">Category Three</a></li>

      </ul>
    </div>
  </div>
</nav>

1 Answers1

0

If you desire is opening a new tab in the browser everytime you click into the link ( a element), all you have to do is append 'target="_blank"' attribute on it.

Example :

changing

<a href="cat3.html">Category Three</a>

to

<a href="cat3.html" target="_blank">Category Three</a>

In case your links aren't working at all, i would like to ask if the target pages are at same directory of the index page. Because as you are referencing at 'href' attribute, to work propertly they has to be there.

DaviLevi
  • 58
  • 1
  • 6
  • The path is accurate and the target attribute does not work. I've tried both of those. Initially, the menu was for a one-page scrolling site. Would you know of anything possibly in css that might be forcing the page to ignore any HTML links? – Ibster1 May 08 '20 at 18:06
  • i am sorry to responding you this late. Unfortunately, i do not know anything that you mentioned above in the comment. I still think that the error is on the path or maybe the filename or/and filename extension. I hope you will solve it soon – DaviLevi May 08 '20 at 23:17