I am trying to allow a button on my website to provide a link.
So far it can be implemented using the <link to "...">
tag.
However I also need my button to stick to the bottom of the column. I have completed this in the code however when I nest my button in the <Link>
tags, the button is no longer sticking to the bottom. Therefore the <Link>
tag is stopping the button from working.
<div className="col-12 col-lg-6 text-left">
<div className="d-flex flex-column h-100">
<Link to="/portfolio/website-designs#">
<button type="button" className="btn-outline-primary mt-auto" style={{
'pointer-events': 'none'
}}> <b> Button Text </b>
</button>
</Link>
</div>
If I remove the <Link>
it works.
Is it because the mt-auto is working directly on the parent, the link tag?
I tried nesting the Link inside around the <b> Button Text </b>
, but the link wasen't working now.
Placing the link button side, unfortunately does not make the link work.
i.e.
<button type="button" className="btn-lg btn-outline-primary mt-auto"<Link to"..."> <b> Learn More </b> </Link> </button>