Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

bootstrap – button href not working when clicking

Do you know why the following do not work clicking on the "href" on the Button, nothing happens?

    <ul class="list-group list-group-flush">
        <li class="list-group-item px-3 border-0 active text-black">
            <div class="row">
                <div class="col-6 col-sm-2">
                    <strong class="text-gray-dark">App</strong>
                </div>
                <div class="col-6 col-sm-3">Description</div>
            </div>
        </li>
        <button href="https://mydomein.com" type="button" class="list-group-item list-group-item-action">
            <div class="row">
                <div class="col-6 col-sm-2">
                    <strong class="text-gray-dark">Hello World</strong>
                </div>
                <div class="col-6 col-sm-3">Description</div>
            </div>
        </button>
</ul>

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I don’t think button href="" even works. Either you can use <a> tag or you can try this:

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" />
<button class="btn btn-success" onclick="window.location.href='https://getbootstrap.com/'">click</button>

And if you are asking logically, In this docs you can check the elements which accepts links.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading