Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts

    links not working

    What are some reasons why a browser might not read an html link tag (<a href="">link</a>)

    Links within one of the <div> tags isn't working. The text "link" is showing, but it's not linking to anywhere.

    Any help is appreciated.

  • #2
    Regular Coder Doctor_Varney's Avatar
    Join Date
    Mar 2008
    Location
    Midlands, UK
    Posts
    649
    Thanks
    45
    Thanked 29 Times in 28 Posts
    Any number of reasons. Could be a misspelling or a tag not closed. Instead of imagining we're all psychic, why not post the offending bit of code, so we can have a look?

    In the meantime, run it through the validator and see if anything comes up. That often fixes these hard to spot human errors.

    Dr. V
    Last edited by Doctor_Varney; 08-31-2010 at 02:47 AM.

  • The Following 2 Users Say Thank You to Doctor_Varney For This Useful Post:

    Decker (08-31-2010), wincode (08-31-2010)

  • #3
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts
    I found the mistake. Thanks a lot for your help

  • #4
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts
    Hmm, it's not working again
    Here's the code:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="text/css" href="featured.css" />
    <link rel="stylesheet" href="/template/style.css" type="text/css">
    <title>Member list</title>
    <META NAME="description" CONTENT="site">
    <META NAME="keywords" CONTENT="site">
    <style type="text/css">
    
    body{
    margin:0;
    padding:0;
    line-height: 1.5em;
    background-color: #f1f1f1;
    }
    
    b{font-size: 110%;}
    em{color: red;}
    
    #maincontainer{
    width: 1000px;
    margin: 0 auto;
    
    }
    
    #topsection{
    height:142px;
    }
    
    
    
    #menus{
    height: 42px;
    max-width:1000px;
    margin: 0 auto;
    border-bottom: 1px solid #ddd;
    background-image: url('/template/menus3.gif');
    font-size: 16px;
    }
    
    #topsectioninside{
    width:1000px;
    margin: 0 auto;
    border-bottom: 1px solid #ddd;
    }
    
    #topsection h1{
    margin: 0;
    padding-top: 15px;
    }
    
    #contentwrapper{
    float: left;
    width: 100%;
    
    }
    
    #contentcolumn{
    margin-left: 210px;
    min-width: 750px;
    }
    
    #leftcolumn{
    float: left;
    width: 210px;
    margin-left: -100%;
    }
    
    #profilewrap{
    float: left;
    width: 100%;
    
    }
    
    #profilenamewrap{
    padding-left: 5px;
    margin-left: 70px;
    min-width: 200px;
    min-height: 80px;
    }
    
    #profilepicwrap{
    float: left;
    width: 70px;
    margin-left: -100%;
    }
    
    #profilemain{
    width: 400px;
    margin: 0 auto;
    
    }
    
    
    
    #colmain{
    width: 750px; 
    margin: 0 auto;
    }
    #colwrap{
    float: left;
    width: 100%;
    }
    
    #col2{
    margin: 0 200px 0 50px; 
    background: #C8FC98;
    }
    
    #col1{
    float: left;
    width: 50px;
    margin-left: -750px;
    background: #C8FC98;
    }
    
    #col3{
    float: left;
    width: 200px;
    margin-left: -200px;
    background: #FDE95E;
    }
    
    
    
    
    
    
    #footer{
    clear: left;
    width: 1000px;
    background: #eee;
    border-top:1px solid #ddd;
    height:42px;
    margin: 0 auto;
    text-align: center;
    
    }
    
    
    .innertube{
    margin: 10px;
    margin-top: 5px;
    a:link {color: #ffffff;}
    a:visited {color: #ffffff;}
    a:active {color: #ffffff;}
    
    }
    
    </style>
    
    
    
    </head>
    <body>
    
    <div id="topsection"><div id="topsectioninside">
    <div id="header">
    
    <div id="logo"><a href="index.php"><img src="/template/logo.png" /></a></div>
    <div id="search_header">
    <strong><a href="/task/login.htm">Log-in</a> | <a href="/task/register.htm">Register</a></strong>	
    </div>
    <div id="down"></div></div>
    
    <div id="menus">
    <center><a href="index.php">Home</a>
     | <a href="/task/search.htm">Search</a>
     | <a href="/task/members.htm">Profiles</a>
     | <a href="/task/links.htm">Links</a>
     |&nbsp;<a href="/task/videos.htm">Videos</a>
    
    				<a href="/task/members.htm">Member list</a></center></div>
    </div>
    </div>
    
    
    
    <div id="maincontainer">
    
    
    
    	<div id="contentwrapper">
    		<div id="contentcolumn">
    
    			<div class="innertube"><a href="http://www.website.com/">Link</a>
    			</div>
    		</div>
    	</div>
    
    	<div id="leftcolumn">
    		<div id="profilemain">
    			<div id="profilewrap">
    				<div id="profilenamewrap">
    					<a href="/profile/Firstname-Lastname.htm"><b>Firstname Lastname</b></a>
    						<br/><a href="profile/Firstname-Lastname.htm">Profile</a> <br/>
    						<a href="task/messages.htm">Messages</a> (0) <br/>
    
    				</div>
    			</div>
    			<div id="profilepicwrap">
    			<a href="/profile/Firstname-Lastname.htm">
    			<img src="/avatars/profilepicture.jpg" width="70px" height="70px"/>
    			</a>
    			</div>
    		</div><br/><a href="/login.php?action=logout">Log-out</a> <br/>
    	</div>
    </div>
    
    
    
    <div id="footer">
    Footer
    </div>
    </body>
    </html>
    I hope you can help please, anyone, and thanks a lot for your time.

  • #5
    Regular Coder cineweekly.com's Avatar
    Join Date
    Aug 2010
    Posts
    485
    Thanks
    14
    Thanked 3 Times in 3 Posts
    I'm scanning the code but it would help if you noted which link I'm looking for.

    Also, is there any specific reason you use .htm instead of .html?

  • #6
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts
    Oh sorry, I forgot!
    The link that doesn't work is
    Code:
    <a href="http://www.website.com/">Link</a>
    And no reason in using .htm. I'm using a script that had the pages as .htm

  • #7
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts
    It seems like it only doesn't work in firefox right now.

  • #8
    met
    met is offline
    Regular Coder
    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    728
    Thanks
    4
    Thanked 119 Times in 119 Posts
    css

    look

    Code:
    .innertube {
    	margin: 10px;
    	margin-top: 5px;
    a:link {
    color: #ffffff;
    }
    
    a:visited { color: #ffffff; }
    
    a:active { color: #ffffff; }
    }
    </style>
    your curly bracers are messed up

    fix this

    in fact most of your css is farily mesed up

    #leftcolumn is 221px wide yet you have elements inside it that are over 400px;

    #profilemain is pushing itself on top of the "link" that isn't working, remove this, link is fine.

    i'd have a rethink about what you're trying to achieve here, the markup is messy
    Last edited by met; 08-31-2010 at 11:23 AM.

  • #9
    New to the CF scene
    Join Date
    Sep 2009
    Location
    Online
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey did you fix it?

  • #10
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts
    Yup, all fixed


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •