Page 1 of 1

Hyperlink issue

Posted: Sun May 17, 2009 5:41 pm
by mikes1471
Hi guys

I've placed a logo on my webpage and a href for my index page like so:

Code: Select all

<div class="pflogo"><a href="http://example.com"><img src="pflogo.png" border="0" /></div>
The dimensions are 644x124

CSS rules for this div are:

Code: Select all

.pflogo{
    position:absolute;
    top:6px;
    left:10px;
    width:700px;
    height:101px;
    
}
Then my login area is as far over the other side of the page as 1000px:

Code: Select all

.login{
    position:absolute;
    top:2px;
    left:1000px;
}
The code for which is here:

Code: Select all

<div class="login">
<form name="form1" method="post" action="checklogin.php">
  <input name="myusername" type="text" value="username" onBlur="if(this.value == '') this.value = 'username'" onFocus="if(this.value == 'username') this.value = ''"  />
<input name="mypassword" type="password" value="password" onBlur="if(this.value == '') this.value = 'password'" onFocus="if(this.value == 'password') this.value = ''"  />
<input type="submit" name="Submit" value="Login" />
</form>
</div>
So why oh why when I click on either the username, password or submit button, does it take me to http://example.com as specified in the div class "pflogo"....?

Re: Hyperlink issue

Posted: Sun May 17, 2009 6:19 pm
by califdon
Maybe because you left off the closing tag </a> ?? Since you never told it where the end of the hyperlink is, it's just following your instructions. These darned computers, they keep doing what we tell them instead of what they should do! :wink:

Re: Hyperlink issue

Posted: Sun May 17, 2009 6:31 pm
by mikes1471
haha yeh thats the problem!

I missed that one, I found a fix for it too, just placed the login script in the head and the hyperlink in the body haha I can put it the way God intended now thanks