Search code examples
csslistclickableunordered

How can I make the whole area of an unorderd list clickable?


I would like to make the entire area of my un ordered list clickable for a single URL. So far without luck.

The CSS markup so far is as follows:

#artListContainer {
margin: 0 0 0 0;
}

#artListContainer ul {
list-style-type: none;
width: 590px;
margin: 20px 0 0 0;
}

#artListContainer h3 {
font: bold 18px/1.5 Helvetica, Verdana, sans-serif;
color:#333333;  
}

#artListContainer li img {
float: left;
margin: 0 15px 0 0;
}

#artListContainer li p {
font: 200 12px/1.5 Helvetica, Verdana, sans-serif;
}

#artListContainer li {
padding: 10px;
overflow: auto;
}

#artListContainer li:hover {
background: #eee;
cursor: pointer;
}

My HTML markup currently looks like this:

<div id="artListContainer">
 <ul>
  <li>
  <img src="themes/default/templates/articles/articlethumbs/8.png">
  <h3>Title goes here</h3>
  <p>description goes here.</p>
  <span style="font-weight:bold">Views:&nbsp;</span>(327)
  &nbsp;&nbsp;&nbsp;
  <span style="font-weight:bold">Comments:&nbsp;</span>(4)
  &nbsp;&nbsp;&nbsp;
  <span style="font-weight:bold">Likes:&nbsp;</span>(4)
  </li>
</ul>
</div>

Many thanks in advance for any help or suggestions.


Solution

  • This is a thing.

    <a href="#">
    <ul>
       <li>Stuff</li>
       <li>Stuff</li>
       <li>Stuff</li>
       <li>Stuff</li>
    </ul>
    </a>