Links will not work on index page

Discussion in 'HTML & Website Design' started by coldnorth, Jul 19, 2010.

  1. #1
    Guys, here is another one of those what am I missing questions. Downloaded a template to save some time, going smooth but for some reason the links on the index page will not work. If I rename the page anything else they work perfect. Any idea what’s happening?

    Before someone asks yes I do have the links coded correctly and pointing to the correct file, correct extension, add the “. Though until recently it had been a long time since I wrote pages I still know how to put a link in.
     
    coldnorth, Jul 19, 2010 IP
  2. Rimona

    Rimona Active Member

    Messages:
    123
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    63
    #2
    Do you want a guess or an answer?

    Does the template call a JS routine? But your guess is as good as mine!
    For me to attempt to answer the question, the seeing the code would be an advantage - a link would be fine too.
     
    Rimona, Jul 19, 2010 IP
  3. coldnorth

    coldnorth Peon

    Messages:
    347
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    coldnorth, Jul 19, 2010 IP
  4. Rimona

    Rimona Active Member

    Messages:
    123
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    63
    #4
    Replace the # in

    <li><a href="#">Aliquam liberonare</a></li>

    with the page you want to link to.

    IE: <li><a href="page_whatever.html">Aliquam liberonare</a></li>
     
    Rimona, Jul 19, 2010 IP
  5. coldnorth

    coldnorth Peon

    Messages:
    347
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Well no kidding. Don’t you think I tried that? As I mentioned, I’m not so old that I do not know how to put a link in. I mentioned, they would function just fine if I renamed the file to anything but index.html.

    I take it you downloaded the template. Were you successful at getting the links to function with the index.html file?
     
    coldnorth, Jul 19, 2010 IP
  6. coldnorth

    coldnorth Peon

    Messages:
    347
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    No, there is no java in the page.
     
    coldnorth, Jul 19, 2010 IP
  7. coldnorth

    coldnorth Peon

    Messages:
    347
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This is the entire page in it's original forum, unaltered and un-edited.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <!--
    Design by Free CSS Templates
    http://www.freecsstemplates.org
    Released for free under a Creative Commons Attribution 2.5 License

    Name : Barnyard
    Description: A two-column, fixed-width design.
    Version : 1.0
    Released : 20080511

    -->
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Barnyard by Free CSS Templates</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <body>
    <!-- start header -->
    <div id="header">
    <h1>Barnyard </h1>
    <p> design By Free CSS Templates</p>
    </div>
    <!-- end header -->
    <div id="banner">&nbsp;</div>
    <!-- start page -->
    <div id="wrapper">
    <div id="page">
    <div class="bgtop">
    <div class="bgbtm">
    <!-- start content -->
    <div id="content">
    <div class="post">
    <h1 class="title">About This Website</h1>
    <p class="byline"><small>Posted on August 25th, 2007 by <a href="#">admin</a> | <a href="#">Edit</a></small></p>
    <div class="entry">
    <p><strong>Barnyard</strong> is a free template from <a href="http://freecsstemplates.org/">Free CSS Templates</a> released under a <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution 2.5 License</a>. The flower photo is fromt <a href="http://www.pdphoto.org/">PDPhoto.org</a>. You're free to use this template for both commercial or personal use. I only ask that you link back to <a href="http://freecsstemplates.org/">my site</a> in some way. Enjoy :)</p>
    </div>
    <p class="meta"><a href="#" class="more">Read More</a> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <a href="#" class="comments">Comments</a> (33)</p>
    </div>
    <div class="post">
    <h2 class="title">Risus Pellentesque</h2>
    <p class="byline"><small>Posted on August 25th, 2007 by <a href="#">admin</a> | <a href="#">Edit</a></small></p>
    <div class="entry">
    <p>Maecenas pede nisl, elementum eu, ornare ac, malesuada at, erat. Proin gravida orci porttitor enim accumsan lacinia. Donec condimentum, urna non molestie semper, ligula enim ornare nibh, quis laoreet eros quam eget ante. Maecenas pede nisl, elementum eu, ornare ac, malesuada at, erat. Proin gravida orci porttitor enim accumsan lacinia. </p>
    </div>
    <p class="meta"><a href="#" class="more">Read More</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#" class="comments">Comments</a> (33)</p>
    </div>
    <div class="post">
    <h2 class="title">Praesent Scelerisque</h2>
    <p class="byline"><small>Posted on August 25th, 2007 by <a href="#">admin</a> | <a href="#">Edit</a></small></p>
    <div class="entry">
    <p>Pellentesque pede. Donec pulvinar ullamcorper metus. In eu odio at lectus pulvinar mollis. Vestibulum sem magna, elementum ut, vestibulum eu, facilisis quis, arcu. Mauris a dolor. Nulla facilisi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed blandit. Phasellus pellentesque, ante nec iaculis dapibus, eros justo auctor lectus, a lobortis lorem mauris quis nunc. Praesent pellentesque facilisis elit. <br />
    </p>
    </div>
    <p class="meta"><a href="#" class="more">Read More</a> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <a href="#" class="comments">Comments</a> (33)</p>
    </div>
    </div>
    <!-- end content -->
    <!-- start sidebar -->
    <div id="sidebar">
    <ul>
    <li>
    <h2>Categories</h2>
    <ul>
    <li><a href="#">Aliquam liberonare</a></li>
    <li><a href="#">Consectetuer adipiscing</a></li>
    <li><a href="#">Metusin pellentesque</a></li>
    <li><a href="#">Suspendisse maurisres</a></li>
    <li><a href="#">Urnanet molestie semper</a></li>
    <li><a href="#">Proin gravida porttitor</a></li>
    </ul>
    </li>
    <li>
    <h2>Blogroll</h2>
    <ul>
    <li><a href="#">Aliquam liberonare</a></li>
    <li><a href="#">Consectetuer adipiscing</a></li>
    <li><a href="#">Metusin pellentesque</a></li>
    <li><a href="#">Suspendisse maurisres</a></li>
    <li><a href="#">Urnanet molestie semper</a></li>
    <li><a href="#">Proin gravida porttitor</a></li>
    </ul>
    </li>
    <li>
    <h2>Archives</h2>
    <ul>
    <li><a href="#">September</a> (23)</li>
    <li><a href="#">August</a> (31)</li>
    <li><a href="#">July</a> (31)</li>
    <li><a href="#">June</a> (30)</li>
    <li><a href="#">May</a> (31)</li>
    <li><a href="#">April</a> (30)</li>
    </ul>
    </li>
    </ul>
    </div>
    <!-- end sidebar -->
    <div style="clear:both">&nbsp;</div>
    </div>
    </div>
    </div>
    </div>
    <div id="footer">
    <p>&copy;2007 All Rights Reserved &nbsp;&bull;&nbsp; Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a> &nbsp;&bull;&nbsp; Icons by <a href="http://www.famfamfam.com/">FAMFAMFAM</a>.</p>
    </div>
    </body>
    </html>
     
    coldnorth, Jul 19, 2010 IP
  8. coldnorth

    coldnorth Peon

    Messages:
    347
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    This is the accompanying CSS


    body {
    margin-top: 20px;
    padding: 0;
    background: #2E2200;
    font-size: 11px;
    text-align: justify;
    color: #ABABAB;
    }

    body, th, td, input, textarea, select, option {
    font-family: "Trebuchet MS", "Times New Roman", Arial, Times, serif;
    }

    h1, h2, h3 {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-weight: normal;
    color: #FFB300;
    }

    h1 {
    letter-spacing: -2px;
    font-size: 3em;
    }

    h2 {
    letter-spacing: -1px;
    font-size: 2em;
    }

    h3 {
    font-size: 1em;
    }

    p, ul, ol {
    line-height: 200%;
    }

    blockquote {
    padding-left: 1em;
    }

    blockquote p, blockquote ul, blockquote ol {
    line-height: normal;
    font-style: italic;
    }

    a {
    color: #CDCDCD;
    }

    a:hover {
    color: #CDCDCD;
    }

    hr {
    display: none;
    }

    #wrapper {
    width: 800px;
    margin: 0 auto;
    padding: 0;
    background: url(images/img04.jpg) repeat-y left top;
    }


    /* Header */

    #header {
    width: 800px;
    height: 61px;
    margin: 0 auto;
    margin-bottom: 20px;
    padding: 0;
    font-family: "Trebuchet MS", "Times New Roman", Arial, Times, serif;
    }

    #header h1, #header p {
    margin: 0;
    }

    #header h1 {
    float: left;
    color: #FFFFFF;
    font-size: 36px;
    padding-left: 15px;
    }

    #header p {
    float: left;
    padding: 17px 0 0 10px;
    font-size: 12px;
    font-weight: bold;
    }

    #header a {
    text-decoration: none;
    color: #F79F1A;
    }

    #banner {
    margin: 0 auto;
    margin-bottom: 15px;
    padding: 0;
    width: 800px;
    height: 250px;
    background: url(images/img01.jpg) no-repeat center;
    }

    /* Page */

    #page {
    width: 800px;
    margin: 0 auto;
    margin-bottom: 15px;
    }

    #page .bgtop {
    background: url(images/img03.jpg) no-repeat left top;
    }

    #page .bgbtm {
    background: url(images/img05.jpg) no-repeat left bottom;
    }

    /* Content */

    #content {
    float: right;
    width: 505px;
    margin: 0;
    padding: 25px 25px 15px 20px;
    }

    .post {
    padding: 0px 0 0 0;
    }

    .title {
    border-left: 6px solid #2E2E2E;
    padding: 0 20px 0 10px;
    font-size: 24px;
    }

    .title a {
    text-decoration: none;
    color: #FFFFFF;
    }

    .pagetitle {
    }

    .byline {
    margin: -25px 20px 0 17px;
    color: #646464;
    }

    .meta {
    text-align: left;
    color: #646464;
    padding: 10px 20px 20px 17px;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 12px;
    }

    .meta .more {
    background: url(images/img08.gif) no-repeat left 50%;
    padding-left: 10px;
    }

    .meta .comments {
    background: url(images/img08.gif) no-repeat left 50%;
    padding-left: 10px;
    }

    .meta a {
    color: #FFB300;
    }

    .navigation {
    }

    .alignleft {
    float: left;
    }

    .alignright {
    float: right;
    }

    .posts {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: normal;
    }

    .posts li {
    }

    .posts h3 {
    margin: 0;
    font-weight: bold;
    }

    .posts p {
    margin: 0;
    line-height: normal;
    }

    .posts a {
    }

    .entry {
    margin: 0;
    padding-left: 17px;
    }

    .last {
    border: none;
    }

    /* Sidebar */

    #sidebar {
    float: left;
    width: 210px;
    margin-bottom: 10px;
    padding: 40px 0 0 40px;
    color: #7A7A7A;
    }

    #sidebar ul {
    margin: 0;
    padding: 0;
    list-style: none;
    }

    #sidebar li {
    margin: 0;
    padding: 0;
    }

    #sidebar li ul {
    margin: 0 0 20px 0;
    padding: 0;
    }

    #sidebar li li {
    margin: 0 0 0 10px;
    padding: 0 0 0 10px;
    background: url(images/img08.gif) no-repeat left 50%;
    line-height: 25px;
    }

    #sidebar h2 {
    margin: 0;
    height: 35px;
    font-size: 18px;
    }

    #sidebar a {
    }

    #sidebar a:hover {
    text-decoration: none;
    }

    /* Search */

    #search input {
    display: none;
    }

    #search input#s {
    display: block;
    width: 230px;
    padding: 2px 5px;
    border: 1px solid #3DD1FF;
    background: #FFFFFF url(images/img05.gif) repeat-x;
    }

    #search br {
    display: none;
    }

    /* Calendar */

    #calendar {
    }

    #calendar h2 {
    margin-bottom: 15px;
    }

    #calendar table {
    width: 80%;
    margin: 0 auto;
    text-align: center;
    }

    #calendar caption {
    width: 100%;
    text-align: center;
    }

    #next {
    text-align: right;
    }

    #prev {
    text-align: left;
    }

    /* Footer */

    #footer {
    width: 800px;
    height: 60px;
    min-height: 60px;
    background: url(images/img02.jpg) no-repeat left top;
    margin: 0 auto;
    margin-bottom: 20px;
    text-align: center;
    font-size: 10px;
    font-family: Arial, Helvetica, sans-serif;
    color: #ABABAB;
    }

    #footer p {
    padding: 20px 0;
    }

    #footer p a {
    color: #FFB300;
    }
     
    coldnorth, Jul 19, 2010 IP
  9. Rimona

    Rimona Active Member

    Messages:
    123
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    63
    #9
    I tried it.

    Here is what I replaced

    <ul>
       <li><a href="1.html">Test 1</a></li>
       <li><a href="2.html">Test 2</a></li>
       <li><a href="3.txt">Test 3</a></li>
       <li><a href="#">Suspendisse  maurisres</a></li>
       <li><a href="#">Urnanet  molestie semper</a></li>
       <li><a href="#">Proin gravida  porttitor</a></li>
    </ul>
    HTML:
    Tested it in both IE and FF and it works.
    Opens HTML files and TEXT files without a problem.

    Would you like me to post it so that you believe me?
     
    Rimona, Jul 19, 2010 IP
  10. coldnorth

    coldnorth Peon

    Messages:
    347
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    No, I beleive you, just very curious why it will not work in mine.
     
    coldnorth, Jul 20, 2010 IP
  11. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #11
    can we see a live link of your webpage?
     
    radiant_luv, Jul 20, 2010 IP
  12. coldnorth

    coldnorth Peon

    Messages:
    347
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #12
    It's not online yet, still working on the page and viewing locally. This really has me puzzled as I can see no reason the links will not work. Puzzled even more as when I re-name the file from index.html to anything else they work fine. I noticed this same thing late last night on another different page I am working on. On the index.html no links will work, re-name it, making no other changes, and the links work.
     
    coldnorth, Jul 20, 2010 IP
  13. Rimona

    Rimona Active Member

    Messages:
    123
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    63
    #13
    Have you tried looking at your pages with a different browser?
     
    Rimona, Jul 20, 2010 IP
  14. coldnorth

    coldnorth Peon

    Messages:
    347
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #14
    No I didn't Rimona, but I seem to have the page fixed, though I do not understand why. As I said, I noticed that when saved as anything but index.html the links worked fine. The same code and absolutely no other changes other than re-naming the file. So, I opened the template again and, as usual, copied it to notepad. This time though, I copied it again, in two sections and then re-named the file to index.html and for some odd reason this worked.

    I just do not understand why this is but suspect that the version of notepad packaged with win 7 is saving the file in ansi instead of Unicode or vice versa-whichever I’m too tired right now to know the difference. Thanks for your help though.
     
    coldnorth, Jul 20, 2010 IP