J
J
jazzus2019-04-21 17:41:36
Bootstrap
jazzus, 2019-04-21 17:41:36

How to place a link in a card?

Whole card

<div class="card">
    <img class="card-img-top" src="..." alt="Card image cap">
    <div class="card-body">
      <h5 class="card-title">Card title</h5>
      <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
      <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
    </div>
  </div>

should be a link that opens the page. How and where to place the link code correctly? So that this card does not change its appearance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WapSter, 2019-04-21
@jazzus

In the current specification, it is allowed to insert block-level elements inside links . You can put .card inside "a". You can put an independent link inside the block and position it relative to .card.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question