Hyperlink issue

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
mikes1471
Forum Commoner
Posts: 88
Joined: Sat Jan 24, 2009 3:29 pm

Hyperlink issue

Post 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"....?
Last edited by Benjamin on Mon May 18, 2009 10:21 am, edited 1 time in total.
Reason: Changed code type from text to html, css.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Hyperlink issue

Post 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:
mikes1471
Forum Commoner
Posts: 88
Joined: Sat Jan 24, 2009 3:29 pm

Re: Hyperlink issue

Post 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
Post Reply