How to resize stat card on website? #1748
-
I'm using a image tag to add a stat card to my website however it seems to be a bit big do the website is adding a scroll bar to the image and I don't want it doing that. I was thinking I might be able to resize it using tags within the image tag but I don't know what the default size is so I'm struggling to find out what size I need to adjust it by to make it fit. Is there also a way to make the size dynamic do it fits to the page and adjusts if it's viewed on mobile compared to pc. I'll edit this later to show a ss of the image on my website as it is at the moment. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@SnowyJaguar1034 Thanks for your question. I noticed that you also asked this question in #1677 (reply in thread) but did not receive an answer. I will therefore post my reply in two places. There are multiple ways to achieve the desired behaviour. The first way is by using the HTML <img height=200 width=200 src="https://github-readme-stats-git-master-rstaa-rickstaa.vercel.app/api/top-langs/?username=rickstaa&layout=compact&langs_count=10&hide_border=1&role=OWNER,COLLABORATOR&theme=dark#gh-dark-mode-only" alt="Rick Staa's Language stats" />
</a> We also have #1334 open to allow users to change the width of the card directly in the SVG. I, however, did not have time yet to look at this PR, but you can already use it in your vercel instance. |
Beta Was this translation helpful? Give feedback.
@SnowyJaguar1034 Thanks for your question. I noticed that you also asked this question in #1677 (reply in thread) but did not receive an answer. I will therefore post my reply in two places.
There are multiple ways to achieve the desired behaviour. The first way is by using the HTML
width
andheight
attributes. This is what I use in my readme. For more information on the available attributes see https://www.w3schools.com/tags/tag_img.asp: