<div class="dashboard-icon">
<a href="./structure/">
<img class="admin-icon" src="<?=inc_path;?>images/icons/home.png" alt="" /></a><br />
<p>Dashboard</p>
</div>
This is part of a menu, do you think it would be better in a UL > LI? I want a label underneath the icon.
Trying to think of reasons if this is bad or not. 🙂
Not if it is a content image (e.g. an icon).
Menus are, typically, lists of links, and using
<ul>and<li>would be appropriate. That won’t prevent you from using an<img>though.A text description for an image probably doesn’t deserve its own paragraph though. I’d set
display: blockon the image if I wanted to force a line break, and put the text inside the<a>so the entire thing is clickable. I certainly wouldn’t use a line break and a paragraph. Usemarginfor spacing.