Bootstrap – Stretched link


Bootstrap – Stretched link



”;


This chapter discusses about the class .stretched-link provided by Bootstrap.

The .stretched-link class in Bootstrap is used to create a link that stretches to fill the entire parent container.

  • This class can be used on any element that can contain a link, such as a <div> or <a> element, to make the entire element clickable and act as a link.

  • Any element with position:relative and contains a link with the .stretched-link class is clickable.

  • The .stretched-link class cannot be mixed with most table elements.

  • This class can be safely added to cards as they have position:relative by default in Bootstrap.

  • Using stretched links with multiple links and tap targets is not advisable.


Card with stretched link

This is useful for cases where you want to make an entire section of content clickable, such as a card or a list item.

Let”s see an example on the usage of the .stretched-link class in a card: