Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: incrediBILL
It's my first post here and I hope that the question isn't too dumb... :)
I'd like to do a layout where you have a list of several elements (each one packed in a <div>). Each of these elements has a short description (packed into a few <p>), and when you click on it (on the whole <div>) you have the complete description. Thus this should be the structure for each of my elements:
But as I'm trying to do XHTML 1.1, I'm not allowed to put the anchor above the <p> and <h*>. But I'd like that when you hover the div, the whole div background gets another color (thanks to some CSS and a block display for the anchor), and the whole div should be clickable, thus I need to put the <a> at the top level...
Is there a way to do what I'd like and still validate XHTML 1.1?
In this example I have to do all the formatting of the h1 and p in the CSS... Not very elegant, if they already exist in the html, they should also be used. But well, if there's no other possibility! ;)
Here I need to put three times the same link. And in this case the background color on hover will only change for each local element (each p and h1), not for the whole div as I'd like. This could be corrected with a hover rule for the div too... But not very nice solution too.
That's all for my current inspiration. :)
i have one more question, is there some condensed documentation that clearly explains the html elements hierarchy, such as what is block-level and so on? of course it's accessible in w3c's html specification, but because there is so much information, it's not very clear if you just want to see and understand that.
and thank you very much for your answer!