Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Team

I am struggling to reduce image folder inside my bootstrap card, the folder is big and its filling the card whole of it. I want to find around it, if any mate can help me on what i have below.

What I have tried:

HTML
<pre>  <div class="card" style="width: 18rem;">
                                        <div class="jump-response"></div>
                                        <div class="card-body d-flex flex-1">
                                            <a href="#" class="btn btn-primary pull-left">Published</a>
                                        </div>

                                        <div class="card-body d-flex flex-center">
                                            <a href="@Url.Action("Modules","Home")" class="card-link pull-left">Me</a>
                                            <img class="card-img-top" src="~/Images/folders/folder-icon.png" >

                                        </div>
                                    </div>
Posted
Updated 9-Sep-20 0:06am

1 solution

Set a width on the image:
HTML
<img class="card-img-top" src="~/Images/folders/folder-icon.png" style="width:32px;">
Or set a max-width on the image:
HTML
<img class="card-img-top" src="~/Images/folders/folder-icon.png" style="max-width:32px;">
Or use the grid layout utilities:
HTML
<div class="row">
    <div class="col-sm">
        <a href="@Url.Action("Modules","Home")" class="card-link">Me</a>
    </div>
    <div class="col-sm-1">
        <img class="card-img-top" src="~/Images/folders/folder-icon.png">
    </div>
</div>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900