View Single Post
Old 09-08-2012, 12:27 AM   PM User | #2
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
Quote:
Originally Posted by johnsmith153 View Post
...which works, but apparently isn't good standard.
That's correct, using block elements inside inline elements is "incorrect".

You can just wrap the tooltip in a <form>:

Code:
form {
     cursor: pointer; /* ? don't know why you wrapped a form in <a> */
}
div {
     display: inline-block;
}
Code:
<form>
    <label> 
         <a href="#">Anchor</a>
    </label>
    <div><!-- form content --></div>
</form>
By your original code, if the form content was clicked it would go to the <a> link. Then what's the purpose of a form?

Last edited by Sammy12; 09-08-2012 at 12:32 AM..
Sammy12 is offline   Reply With Quote