the right way to do responsive

                        <div>
                           <a href="#" class="text-decoration-none ">
                                <div class="img-wrapper d-inline-block" id="img-1">
                                    <img src="assets/img/Literature.png" alt="Literature">
                                </div>
                                <p>Literature</p>
                            </a>
                            <button class="btn btn-primary w-100 fw-bold" style="width: calc(100%-#img-1);">Quiz</button>
                        </div>

i have these a bunch of them like it
and i'm doing responsive where they look like this , the issue is i wanna retrieve the width of the img's and give it to property width for button selector

here's the link
image.png
Was this page helpful?