1

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>

1 Answer 1

1

I don't think button href="" even works. Either you can use <a> tag or you can try:onclick="window.location.href='https://domein.com'"

Demo

<link href="https://cdn.jsdelivr.net/npm/[email protected]/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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.