Hi all,
Just so you know, I'm no expert with code or markup, but I get by.
I have recently created a link with content inside:
This is so that I can have a hover state and active link area in a rectangle with the image and text inside.
I understand that this isn't semantically correct, but it seems to do what I need in all the browsers I can get my hands on. This will not validate due to having block elements within inline elements.
I know you can do some javascript to have the same effect, but this works, so why bother?
Does anyone know a way to do this so that it will validate?
Or do you think that it will be understood as a valid way of doing it even though it doesn't validate?
I will be using this on my portfolio page and am sure someone will complain it doesn't validate.
Just so you know, I'm no expert with code or markup, but I get by.
I have recently created a link with content inside:
HTML:
<a href="work.html" id="work1" class="workfront"><img alt="work1" src="images/work.jpg" class="workfrontthumb" /><h4>Title</h4><p>Description</p></a>
This is so that I can have a hover state and active link area in a rectangle with the image and text inside.
I understand that this isn't semantically correct, but it seems to do what I need in all the browsers I can get my hands on. This will not validate due to having block elements within inline elements.
I know you can do some javascript to have the same effect, but this works, so why bother?
Does anyone know a way to do this so that it will validate?
Or do you think that it will be understood as a valid way of doing it even though it doesn't validate?
I will be using this on my portfolio page and am sure someone will complain it doesn't validate.