BillyRayPreachersSon
Programmer
Does anyone know of any good reason not to do the following:
Code:
<a href=""><span style="display:block">xyz</span></a>
You can't use a div inside an a tag while keeping XHTML1.1 strict compatible, but the above code validates OK.
What I want to know are the pros and cons (if any) of doing this. Does anyone know of any cross-browser issues, display issues, etc with doing this?
Incidentally, i'm doing it so that I can set a width and height for the inner span, rather than doing this for the a tag itself.
Thanks,
Dan