I've come up with a unique way to create an accordion viewer using input and label elements.
In order to vertically center my elements, I treat the label as if it were a div by giving it display: table
and inserting a div inside of it. Here's what it looks like:
<div>
<input id='myid'>
<label for ='myid' style='display table'>
<div style='display: table-cell'>
<img ....... >
thetextforthelabel
</div>
</label>
</div>
This method works perfectly for me.
My question is: am I breaking any rules or guidelines by using the label tag in this way? I understand that it may not be conventional, but it serves its purpose for me...