3

How do I make the entire red area 'clickable'? I'd rather not use Javascript if I can help it.

https://jsfiddle.net/8m6z0h22/

.block {
    width: 200px;
    height: 272px;
    background:red;
    border: 0;
}
<div class="block"> 
      <h3>Book a season ticket with Manchester United</h3>
      <ul> 
      <li><a href="#" title="Read more about Manchester United">Read more about Manchester United <span class="bold">></span></a></li> 
      </ul>
    </div>
michaelmcgurk
  • 6,367
  • 23
  • 94
  • 190

4 Answers4

8

Wrap all your code inside <a> tag instead of <div>.

.block {
    text-decoration: none;
    width: 200px;
    height: 272px;
    background:red;
    border: 0;
    display: block;
}
.block h3 {
  color: black;
}
.block ul li {
  text-decoration: underline;
}
<a href="#" title="Read more about Manchester United" class="block"> 
  <h3>Book a season ticket with Manchester United</h3>
  <ul> 
    <li>Read more about Manchester United <span class="bold">></span></li> 
  </ul>
</a>
Mohammad Usman
  • 37,952
  • 20
  • 92
  • 95
2

Please search before asking questions.

These links might help you

How to make an entire div clickable with CSS

How to make a whole 'div' clickable in html and css without javascript?

Community
  • 1
  • 1
ngrj
  • 337
  • 1
  • 3
  • 12
0

you can add whole div in a

.block {
    width: 200px;
    height: 272px;
    background:red;
    border: 0;
}
a{

    text-decoration:none;
}
<a href="#" title="Read more about Manchester United"><div class="block"> 
      <h3>Book a season ticket with Manchester United</h3>
      <ul> 
      <li>Read more about Manchester United <span class="bold"></span></li> 
      </ul>
    </div>
 </a>
Sagar Kodte
  • 3,723
  • 4
  • 23
  • 52
0

Just put the div inside the anchor tag:

<a href="#" title="Read more about Manchester United"><div class="block"> 
  <h3>Book a season ticket with Manchester United</h3>
  <ul> 
    <li>Read more about Manchester United <span class="bold">></span></li> 
  </ul>
 </div>
</a>
Sagar Kodte
  • 3,723
  • 4
  • 23
  • 52
DanielTheGeek
  • 183
  • 1
  • 16