Anchor link does not work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • timgraham
    New Member
    • Dec 2007
    • 2

    Anchor link does not work

    This is the first time I have ever needed links within a page. Thought it was simple, but it won't work at all. The page validates and I can't see any reason why it would not work. Appreciate any help given. :-)

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    .camerabag_guide .category h1 {
    	font-size: 1.2em;
    	color: #003366;
    	margin: 0px;
    	padding: 0px;
    }
    .camerabag_guide .category .questions a:link, .camerabag_guide .category .questions a:visited {
    	text-decoration: none;
    	color: #CC6600;
    }
    .camerabag_guide .answers h1 {
    	color: #330033;
    	background-color: #CCCCCC;
    	margin: 0px;
    	padding: 0px 0px 0px 1%;
    }
    .camerabag_guide .answers .answer_holder {
    	border: thin solid #9900FF;
    	margin-bottom: 1%;
    }
    .camerabag_guide .answers .answer {
    	color: #00CC66;
    	padding-left: 1%;
    }
    -->
    </style>
    </head>
    <body>
    <div class="camerabag_guide">
    
      <div class="category"> 
       
    <h1>What is Camerabag ?</h1><br>
    <div class="questions">
    <a href="#question1">About Camerabag ?</a><br>
    <a href="#question2">Who should use Camerabag ?</a><br>
    </div><br>
    
    <h1>How to Sell gear using Camerabag?</h1><br>
    <div class="questions">
    <a href="#question3">This is a question</a><br>
    </div><br>
    
    </div><br>
    
    
    <div class="answers">
    
    <div class="answer_holder">
    <h1 id="question1">About Camerabag ?</h1>
    <p class="answer">
    Camerabag is the new way to buy and sell camera gear online</p>
    </div>
    
    <div class="answer_holder">
    <h1 id="question2">Who should use Camerabag ?</h1>
    <p class="answer">
    Anyone who wants to</p>
    </div>
    
    <div class="answer_holder">
    <h1 id="question3">This is a question</h1>
    <p class="answer">
    This is an answer</p>
    </div>
    
    </div>
     </div>
    </body>
    </html>
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    Hi,
    Its working fine for me. May be add some more content to the answers to add the page out a bit. or alternativly what browser are you using maybe its x-browser issues

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Works for me too.

      Your page just needs stretching out a bit.

      Comment

      Working...