Srishti Kaushal Srishti Kaushal - 6 months ago 6
CSS Question

I am not able to give a link to the icon in the list

So this is code of a bootstrap template
`


  • Info
  • Contact



  • `

    The internal link is working but I am not able to link it to external html doc via the icon. This is the code I gave...........(change in the first list item)



  • Info
  • Contact




  • I am unable to add code in the question as it is directly giving output....how can I add it?

    Answer

    Your code works fine, I just replaced the icon class.

    Run in full screen mode(as you are using an md offset) :

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    
    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
    
    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
    
    <div class="collapse navbar-collapse col-md-5 col-md-offset-5">
      <ul class="nav navbar-nav">
        <li><a href="index.html"><i class="glyphicon glyphicon-home" ></i></a>
        </li>
        <li><a href="#info">Info</a>
        </li>
        <li><a href="#contact">Contact</a>
        </li>
      </ul>
    </div>

    Comments